@@ -694,7 +694,7 @@ def test_ogr2ogr_lib_sql_filename(tmp_vsimem):
694
694
"""-- initial comment\n select\n '--''--' as literalfield,* from --comment\n poly\n -- trailing comment""" ,
695
695
):
696
696
ds = gdal .VectorTranslate (
697
- "" , "../ogr/data/poly.shp" , options = f"-f Memory -sql @{ tmp_vsimem } /my.sql"
697
+ "" , "../ogr/data/poly.shp" , options = f"-f MEM -sql @{ tmp_vsimem } /my.sql"
698
698
)
699
699
lyr = ds .GetLayer (0 )
700
700
assert lyr .GetFeatureCount () == 10
@@ -818,7 +818,7 @@ def test_ogr2ogr_assign_coord_epoch():
818
818
src_ds .CreateLayer ("layer" )
819
819
820
820
ds = gdal .VectorTranslate (
821
- "" , src_ds , options = "-f Memory -a_srs EPSG:7665 -a_coord_epoch 2021.3"
821
+ "" , src_ds , options = "-f MEM -a_srs EPSG:7665 -a_coord_epoch 2021.3"
822
822
)
823
823
lyr = ds .GetLayer (0 )
824
824
srs = lyr .GetSpatialRef ()
@@ -842,7 +842,7 @@ def test_ogr2ogr_s_coord_epoch():
842
842
ds = gdal .VectorTranslate (
843
843
"" ,
844
844
src_ds ,
845
- options = "-f Memory -s_srs EPSG:9000 -s_coord_epoch 2030 -t_srs EPSG:7844" ,
845
+ options = "-f MEM -s_srs EPSG:9000 -s_coord_epoch 2030 -t_srs EPSG:7844" ,
846
846
)
847
847
lyr = ds .GetLayer (0 )
848
848
f = lyr .GetNextFeature ()
@@ -868,7 +868,7 @@ def test_ogr2ogr_t_coord_epoch():
868
868
ds = gdal .VectorTranslate (
869
869
"" ,
870
870
src_ds ,
871
- options = "-f Memory -t_srs EPSG:9000 -t_coord_epoch 2030 -s_srs EPSG:7844" ,
871
+ options = "-f MEM -t_srs EPSG:9000 -t_coord_epoch 2030 -s_srs EPSG:7844" ,
872
872
)
873
873
lyr = ds .GetLayer (0 )
874
874
f = lyr .GetNextFeature ()
@@ -1739,25 +1739,25 @@ def test_ogr2ogr_lib_dateTimeTo():
1739
1739
1740
1740
with gdal .quiet_errors ():
1741
1741
with pytest .raises (Exception ):
1742
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo" )
1742
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo" )
1743
1743
with pytest .raises (Exception ):
1744
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo foo" )
1744
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo foo" )
1745
1745
with pytest .raises (Exception ):
1746
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTCx" )
1746
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTCx" )
1747
1747
with pytest .raises (Exception ):
1748
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTCx12" )
1748
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTCx12" )
1749
1749
with pytest .raises (Exception ):
1750
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+15" )
1750
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+15" )
1751
1751
with pytest .raises (Exception ):
1752
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+12:" )
1752
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+12:" )
1753
1753
with pytest .raises (Exception ):
1754
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+12:3" )
1754
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+12:3" )
1755
1755
with pytest .raises (Exception ):
1756
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+12:34" )
1756
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+12:34" )
1757
1757
with pytest .raises (Exception ):
1758
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+12:345" )
1758
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+12:345" )
1759
1759
1760
- dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC+03:00" )
1760
+ dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC+03:00" )
1761
1761
dst_lyr = dst_ds .GetLayer (0 )
1762
1762
f = dst_lyr .GetNextFeature ()
1763
1763
assert f ["dt" ] == "2023/02/01 02:19:56.789+03"
@@ -1769,22 +1769,22 @@ def test_ogr2ogr_lib_dateTimeTo():
1769
1769
f = dst_lyr .GetNextFeature ()
1770
1770
assert not f .IsFieldSet ("dt" )
1771
1771
1772
- dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC" )
1772
+ dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC" )
1773
1773
dst_lyr = dst_ds .GetLayer (0 )
1774
1774
f = dst_lyr .GetNextFeature ()
1775
1775
assert f ["dt" ] == "2023/01/31 23:19:56.789+00"
1776
1776
1777
- dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC-13:15" )
1777
+ dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC-13:15" )
1778
1778
dst_lyr = dst_ds .GetLayer (0 )
1779
1779
f = dst_lyr .GetNextFeature ()
1780
1780
assert f ["dt" ] == "2023/01/31 10:04:56.789-1315"
1781
1781
1782
- dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC-13:30" )
1782
+ dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC-13:30" )
1783
1783
dst_lyr = dst_ds .GetLayer (0 )
1784
1784
f = dst_lyr .GetNextFeature ()
1785
1785
assert f ["dt" ] == "2023/01/31 09:49:56.789-1330"
1786
1786
1787
- dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f Memory -dateTimeTo UTC-13:45" )
1787
+ dst_ds = gdal .VectorTranslate ("" , src_ds , options = "-f MEM -dateTimeTo UTC-13:45" )
1788
1788
dst_lyr = dst_ds .GetLayer (0 )
1789
1789
f = dst_lyr .GetNextFeature ()
1790
1790
assert f ["dt" ] == "2023/01/31 09:34:56.789-1345"
@@ -2821,7 +2821,7 @@ def test_ogr2ogr_lib_not_enough_gcp():
2821
2821
with pytest .raises (
2822
2822
Exception , match = "Failed to compute GCP transform: Not enough points available"
2823
2823
):
2824
- gdal .VectorTranslate ("" , src_ds , options = "-f Memory -gcp 0 0 0 0" )
2824
+ gdal .VectorTranslate ("" , src_ds , options = "-f MEM -gcp 0 0 0 0" )
2825
2825
2826
2826
2827
2827
###############################################################################
@@ -2836,7 +2836,7 @@ def test_ogr2ogr_lib_two_gcps():
2836
2836
src_lyr .CreateFeature (f )
2837
2837
2838
2838
out_ds = gdal .VectorTranslate (
2839
- "" , src_ds , options = "-f Memory -gcp 1 2 200 300 -gcp 3 4 300 400"
2839
+ "" , src_ds , options = "-f MEM -gcp 1 2 200 300 -gcp 3 4 300 400"
2840
2840
)
2841
2841
out_lyr = out_ds .GetLayer (0 )
2842
2842
f = out_lyr .GetNextFeature ()
0 commit comments