Skip to content

Commit 50625d4

Browse files
committed
gdal vector set-field-type: rename --src-field-type to --input-field-type
1 parent f1d75bb commit 50625d4

4 files changed

Lines changed: 11 additions & 9 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ init
125125
input
126126
input-crs
127127
input-field
128+
input-field-type
128129
input-format
129130
input-layer
130131
input-max
@@ -314,7 +315,6 @@ spatial-extent-adjustment
314315
spectral
315316
split-multipolygons
316317
sql
317-
src-field-type
318318
start-angle
319319
stat
320320
stats

apps/gdalalg_vector_set_field_type.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ GDALVectorSetFieldTypeAlgorithm::GDALVectorSetFieldTypeAlgorithm(
3434
.SetMutualExclusionGroup("name-or-type");
3535
SetAutoCompleteFunctionForFieldName(fieldNameArg, layerArg, m_inputDataset);
3636
AddFieldTypeSubtypeArg(&m_srcFieldType, &m_srcFieldSubType,
37-
&m_srcFieldTypeSubTypeStr, "src-field-type",
37+
&m_srcFieldTypeSubTypeStr, "input-field-type",
3838
_("Source field type or subtype"))
39+
.AddHiddenAlias("src-field-type")
3940
.SetRequired()
4041
.SetMutualExclusionGroup("name-or-type");
4142
AddFieldTypeSubtypeArg(&m_newFieldType, &m_newFieldSubType,
4243
&m_newFieldTypeSubTypeStr, std::string(),
4344
_("Target field type or subtype"))
44-
.AddAlias("dst-field-type")
45+
.AddHiddenAlias("dst-field-type")
46+
.AddAlias("output-field-type")
4547
.SetRequired();
4648
AddValidationAction(
4749
[this] { return m_inputDataset.empty() || GlobalValidation(); });

autotest/utilities/test_gdalalg_vector_set_field_type.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,8 +422,8 @@ def test_gdalalg_set_field_type_src_field_type():
422422
"vector",
423423
"set-field-type",
424424
input=src_ds,
425-
src_field_type="String",
426-
dst_field_type="Integer",
425+
input_field_type="String",
426+
output_field_type="Integer",
427427
output_format="MEM",
428428
)
429429
ds = alg.Output()

doc/source/programs/gdal_vector_set_field_type.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ Program-Specific Options
3636

3737
The name of the field to modify.
3838

39-
Mutually exclusive with :option:`--src-field-type`. One of them is required.
39+
Mutually exclusive with :option:`--input-field-type`. One of them is required.
4040

41-
.. option:: --field-type, --dst-field-type <FIELD-TYPE>
41+
.. option:: --field-type, --output-field-type <FIELD-TYPE>
4242

4343
The new field type. Valid values are: ``Integer``, ``IntegerList``, ``Real``, ``RealList``, ``String``, ``StringList``, ``Binary``, ` ``Date``, ``Time``, ``DateTime``, ``Integer64``, ``Integer64List``.
4444
A field subtype can be specified instead of a field type. Valid values are: ``Boolean``, ``Int16``, ``Float32``, ``JSON``, ``UUID``. The field type will be derived from the subtype.
4545

46-
.. option:: --src-field-type <FIELD-TYPE>
46+
.. option:: --input-field-type <FIELD-TYPE>
4747

4848
The field type of the fields to modify.
4949
Valid values are: ``Integer``, ``IntegerList``, ``Real``, ``RealList``, ``String``, ``StringList``, ``Binary``, ` ``Date``, ``Time``, ``DateTime``, ``Integer64``, ``Integer64List``.
@@ -106,4 +106,4 @@ Examples
106106

107107
.. code-block:: bash
108108
109-
$ gdal vector set-field-type input.gpkg output.gpkg --src-field-type Date --dst-field-type DateTime
109+
$ gdal vector set-field-type input.gpkg output.gpkg --input-field-type Date --output-field-type DateTime

0 commit comments

Comments
 (0)