Skip to content

Commit

Permalink
Merge pull request #4496 from rouault/autotest_update_for_epsg_10_035
Browse files Browse the repository at this point in the history
autotest: make it robust to EPSG 10.035 update
  • Loading branch information
rouault authored Sep 16, 2021
2 parents 33860b7 + 661fa85 commit 3bf4e16
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
29 changes: 14 additions & 15 deletions autotest/ogr/ogr_mitab.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def test_ogr_mitab_19():
feat.DumpReadable()
pytest.fail()



###############################################################################
# Check that we take into account the user defined bound file
Expand Down Expand Up @@ -778,7 +778,7 @@ def test_ogr_mitab_23():

ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename)


###############################################################################
# Test creating features then reading then creating again then reading

Expand Down Expand Up @@ -821,7 +821,7 @@ def test_ogr_mitab_24():

ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename)


###############################################################################
# Test that opening in update mode without doing any change does not alter
# file
Expand Down Expand Up @@ -885,7 +885,7 @@ def test_ogr_mitab_25():

ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename)


###############################################################################
# Test DeleteFeature()

Expand Down Expand Up @@ -954,7 +954,7 @@ def test_ogr_mitab_26():

ogr.GetDriverByName('MapInfo File').DeleteDataSource(filename)


###############################################################################
# Test SetFeature()

Expand Down Expand Up @@ -1598,8 +1598,7 @@ def test_ogr_mitab_35():
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"]]'
assert srs.GetAuthorityCode(None) == '2154'
coordsys = get_coordsys_from_srs(srs)
assert coordsys == 'CoordSys Earth Projection 3, 33, "m", 3, 46.5, 44, 49, 700000, 6600000'

Expand Down Expand Up @@ -1738,7 +1737,7 @@ def test_ogr_mitab_38():
f.DumpReadable()
pytest.fail()


###############################################################################
# Read various geometry types from .mif

Expand All @@ -1762,7 +1761,7 @@ def test_ogr_mitab_39():
f_ref.DumpReadable()
pytest.fail()


###############################################################################
# Read various geometry types from .mif but potentially truncated

Expand Down Expand Up @@ -1805,7 +1804,7 @@ def test_ogr_mitab_41():
f_ref.DumpReadable()
pytest.fail()


###############################################################################
# Read various geometry types from .tab with block size = 32256

Expand All @@ -1829,7 +1828,7 @@ def test_ogr_mitab_42():
f_ref.DumpReadable()
pytest.fail()


###############################################################################
# Test creating tab with block size = 32256

Expand Down Expand Up @@ -1982,7 +1981,7 @@ def test_ogr_mitab_45():

gdaltest.mapinfo_drv.DeleteDataSource(dsName)


###############################################################################
# Test read MapInfo layers with encoding specified

Expand Down Expand Up @@ -2031,7 +2030,7 @@ def test_ogr_mitab_46():
' expected value: "' + expectedValue + '"\n'
' from dataset :' + dsName)


###############################################################################
# Test opening a dataset with a .ind file

Expand All @@ -2054,7 +2053,7 @@ def test_ogr_mitab_47():
for ext in ('tab', 'dat', 'map', 'id'):
gdal.Unlink('/vsimem/poly_indexed.' + ext)


###############################################################################
# Test writing and reading LCC_1SP

Expand Down Expand Up @@ -2378,7 +2377,7 @@ def test_ogr_mitab_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))

Expand Down
2 changes: 1 addition & 1 deletion autotest/osr/osr_epsg.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ def test_osr_GetCRSInfoListFromDatabase():
found = False
for record in l:
if record.auth_name == 'EPSG' and record.code == '2154':
assert record.name == 'RGF93 / Lambert-93'
assert 'Lambert-93' in record.name
assert record.type == osr.OSR_CRS_TYPE_PROJECTED
assert not record.deprecated
assert record.bbox_valid
Expand Down

0 comments on commit 3bf4e16

Please sign in to comment.