Skip to content

Commit ef1c32f

Browse files
committed
gdal vector concat: rename --src-crs and --dst-crs to --input-crs and --output-crs [ci skip]
1 parent a7ad676 commit ef1c32f

4 files changed

Lines changed: 24 additions & 20 deletions

File tree

.github/workflows/ubuntu_26.04/reference_arg_names.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ include-valid
126126
include-xy
127127
init
128128
input
129+
input-crs
129130
input-field
130131
input-format
131132
input-layer
@@ -225,6 +226,7 @@ operator
225226
optimization
226227
out-of-range-value
227228
output
229+
output-crs
228230
output-data-type
229231
output-format
230232
output-layer

apps/gdalalg_vector_concat.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,14 @@ GDALVectorConcatAlgorithm::GDALVectorConcatAlgorithm(bool bStandalone)
7575
&m_fieldStrategy)
7676
.SetChoices("union", "intersection")
7777
.SetDefault(m_fieldStrategy);
78-
AddArg("src-crs", 's', _("Source CRS"), &m_srsCrs)
78+
AddArg("input-crs", 's', _("Input CRS"), &m_srsCrs)
7979
.SetIsCRSArg()
80-
.AddHiddenAlias("s_srs");
81-
AddArg("dst-crs", 'd', _("Destination CRS"), &m_dstCrs)
80+
.AddHiddenAlias("s_srs")
81+
.AddHiddenAlias("src-crs");
82+
AddArg("output-crs", 'd', _("Output CRS"), &m_dstCrs)
8283
.SetIsCRSArg()
83-
.AddHiddenAlias("t_srs");
84+
.AddHiddenAlias("t_srs")
85+
.AddHiddenAlias("dst-crs");
8486
}
8587

8688
GDALVectorConcatAlgorithm::~GDALVectorConcatAlgorithm() = default;

autotest/utilities/test_gdalalg_vector_concat.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def test_gdalalg_vector_concat_dst_crs():
122122
alg["input"] = [ds1, ds2]
123123
alg["output"] = ""
124124
alg["output-format"] = "MEM"
125-
alg["dst-crs"] = "EPSG:4326"
125+
alg["output-crs"] = "EPSG:4326"
126126
assert alg.Run()
127127
ds = alg["output"].GetDataset()
128128
lyr = ds.GetLayerByName("test")
@@ -156,7 +156,7 @@ def test_gdalalg_vector_concat_dst_crs():
156156
alg["input"] = [ds3]
157157
alg["output"] = ""
158158
alg["output-format"] = "MEM"
159-
alg["dst-crs"] = "EPSG:4326"
159+
alg["output-crs"] = "EPSG:4326"
160160
with pytest.raises(
161161
Exception, match="concat: Layer 'test' of '' has no spatial reference system"
162162
):
@@ -166,7 +166,7 @@ def test_gdalalg_vector_concat_dst_crs():
166166
alg["input"] = [ds3]
167167
alg["output"] = ""
168168
alg["output-format"] = "MEM"
169-
alg["src-crs"] = "EPSG:32631"
169+
alg["input-crs"] = "EPSG:32631"
170170
alg["dst-crs"] = "EPSG:4326"
171171
assert alg.Run()
172172
ds = alg["output"].GetDataset()

doc/source/programs/gdal_vector_concat.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,6 @@ This command can also be used as the first step of :ref:`gdal_vector_pipeline`.
5959
Program-Specific Options
6060
------------------------
6161

62-
.. option:: -d, --dst-crs <SRC-CRS>
63-
64-
Set destination spatial reference.
65-
66-
.. include:: options/srs_def_gdalwarp.rst
67-
6862
.. option:: --field-strategy union|intersection
6963

7064
Determines how the schema of the target layer is built from the schemas of
@@ -75,11 +69,24 @@ Program-Specific Options
7569
- ``intersection`` to use a sub-set of all the common fields from all
7670
source layers.
7771

72+
.. option:: --input-crs, -s <INPUT-CRS>
73+
74+
Set (override) input spatial reference. If not specified the SRS found in the input
75+
dataset will be used.
76+
77+
.. include:: options/srs_def_gdalwarp.rst
78+
7879
.. option:: --mode merge-per-layer-name|stack|single
7980

8081
Determine the strategy to create output layers from source layers. See
8182
introductory paragraph for more details.
8283

84+
.. option:: --output-crs, -d <OUTPUT-CRS>
85+
86+
Set output spatial reference. Inputs will be reprojected to this CRS if necessary.
87+
88+
.. include:: options/srs_def_gdalwarp.rst
89+
8390
.. option:: --output-layer <OUTPUT-LAYER>
8491

8592
Name of the output vector layer (in ``single`` mode, and the default is
@@ -113,13 +120,6 @@ Program-Specific Options
113120
determined :option:`--source-layer-field-content`.
114121

115122

116-
.. option:: -s, --src-crs <SRC-CRS>
117-
118-
Set source spatial reference. If not specified the SRS found in the input
119-
dataset will be used.
120-
121-
.. include:: options/srs_def_gdalwarp.rst
122-
123123
Standard Options
124124
----------------
125125

0 commit comments

Comments
 (0)