GDAL-VECTOR-EXPORT-SCHEMA(1) GDAL GDAL-VECTOR-EXPORT-SCHEMA(1)
>>> (NAME)
gdal-vector-export-schema - >>>>>>>> OGR_SCHEMA >>
>> >>>>>>>>>>> >>>>>>
>> >>>> 3.13 >>>>> >>.
>>>>> >>>>> (SYNOPSIS)
Usage: gdal vector export-schema [OPTIONS] ...
Export the OGR_SCHEMA from a vector dataset.
Positional arguments:
-i, --dataset, --input Input vector datasets [may be repeated] [required]
Common Options:
-h, --help Display help message and exit
--json-usage Display usage as JSON document and exit
--config = Configuration option [may be repeated]
Options:
-l, --layer, --input-layer Input layer name [may be repeated]
Advanced Options:
--oo, --open-option = Open options [may be repeated]
--if, --input-format Input formats [may be repeated]
>>>>>>> (DESCRIPTION)
>>>>> gdal vector export-schema >>>>> OGR_SCHEMA
>> >> >> >>>>>>>>>>>
>>>>>> >>> >>>>>>>> GDAL
>>>>>>>> >>>> > >>>>>
>>>>>>> >> >>>> >> >>>>>>
>> >> >> >>>>> >>>>>
>>>>>>>>>> > >>>>>
>>>>>>> >> >>>> API> >>
>>>>>>> output >>>>>>>>>>>.
OGR_SCHEMA >> >>> JSON >>> >> >>>>>>
>> >>>>>>>>>>> >>>>>> >>
>> >>>> >>>>> >>>> >>
ogr_fields_override.schema.json >>>>> >>>>>>.
>>>>> gdal vector export-schema >>>>>>>>
>> >>>>> >>>>> >>>>>> >> >>
>>>> (pipeline) >>>>>>> >>>.
>>>>>>>>> >>> >> >>>>>
>>>>>:
>>>>>>>>> >>>> >>>>>> (PROGRAM-SPECIFIC
OPTIONS)
-l, --layer, --input-layer
>>> >> >> >>> >>>> >>>>
>>>>>. >>> >>> >>>>>>>
>>>> >>>>> >>>> >>>>>>>
>>>>>> >>>>>> >>.
>>>>>>>>> >>>>>>>>> (STANDARD OPTIONS)
--oo, --open-option =
>>>>> >>> >>>>
>>>>>>>>>>> (>>>> >>
>>>>).
>>>>>>>> >>>>> >>>.
--if, --input-format
>>> >>>>/>>>>>> >>>>
>>>> >>>> >>> >>>>
>>>>(>>>) >>>>>. >>>>>>
>>> >>>> >>>> >> >>>>>
>>>>> >>> >>>>>> >>
>>>>> >>>>>> >>>>>> >>
>>>>>> >>>>>> >>>>>
>>>>>> >>>>> >>>>>>>>
>>>> >>>>>>> >> >>>>>
>>>>>> >> >>> >>>. >>>
>>>>> >>>>>>>> >>>>>
>>> >>>> >>>> >>>> >>>>>
>>>>>> >>>>>> >>>>> >>>.
>>>> >>>>> >>>>> >> >>>
>>>>> >> >>>>>>>> >>
>>>>> >> >>> >>>>
>>>>>>>>>>> >>>>>>>>
>>>>>>> >>>>>> >>>>
>>>>>>>> >>>>>>>>>>>>>
>>>> >>>>> >>>> >>>>>.
>>>>>>>> >>>>> >>>.
>>>>> >>>> (RETURN STATUS CODE)
>>>>>> >> >>>> >>>>>> >>
>>>>> > > >> >>>> >>>> >>>
>>>>>> >>> >>>
>>>>>>>>>>> (>>>>>>
>>>>>>>>>>>>> >> >> >>>
>>>>> >>>> >>>>>>>> >>
>>>>> >>>>> >>>>>>>>>>>
>> >>> >>>>> >>>>>>>).
>>>>>>> (EXAMPLES)
>>>> >: >>>>>>> OGR_SCHEMA >> >>>>
poly.gpkg
gdal vector export-schema poly.gpkg
>>>> >: >>>>> OGR_SCHEMA >> >> >>>>
>>>>> >>>>>>> >> Windows PowerShell 5.1>
>>>>> >>>>> >> > >> Out-File -Encoding utf8
>> >>>>> UTF-8 >> >>>>> BOM (Byte Order
Mark) >>>>> >>>>>>. >>>>>
>>>>>>> >> >>> >>>> >> gdal vector
create >>>> >>> >> >>>> ERROR 1: JSON parsing
error: unexpected character (at offset 0) >>>>> >>>.
>> PowerShell 5.1> >>>> >>>>>>>>> JSON
>> >>>> >>>>>>>>> >>> ASCII
>>>>> >> -Encoding ascii >>>>>>>
>>>>. Bash
gdal vector export-schema natural_earth_vector.gpkg --layer "ne_50m_admin_0_countries" > countries.json
PowerShell
# PowerShell 5.1
gdal vector export-schema natural_earth_vector.gpkg --layer "ne_50m_admin_0_countries" | Out-File countries.json -Encoding ascii
# PowerShell 7+
gdal vector export-schema natural_earth_vector.gpkg --layer "ne_50m_admin_0_countries" | Out-File countries.json -Encoding utf8
>>>> >: >>>>>>>>>> >>>> OGR_SCHEMA
>> >>>>>>> >> >>>>>>
>>>>>>>>>> >> >>>>> >>>>>
>>>> >>>>> >>>> >>
ogr_fields_override.schema.json >> >>>>>>> >>
>>>> >>>>>> check-jsonschema >>>>> >>
PyPI.
$ pip install check-jsonschema
$ check-jsonschema --schemafile https://raw.githubusercontent.com/OSGeo/gdal/master/ogr/data/ogr_fields_override.schema.json countries.json --verbose
>>>> >: >>>>> >> OGR_SCHEMA >>
>>>>>> >> >> >>>>
>>> >>>> >>> >> >>>>>>>>
OGR_SCHEMA >>>>> >>>> pop_est >> >>
estimated_population >>>>> >>> >>>> >
>>> >> >> >> Real >> Integer >>>>>
>>>>>>. Bash
gdal vector pipeline \
! read natural_earth_vector.gpkg --layer ne_50m_admin_0_countries \
! sql --sql "SELECT geom,name,abbrev,pop_est AS estimated_population FROM ne_50m_admin_0_countries" --output-layer "countries" \
! set-field-type --field-name "estimated_population" --field-type Integer \
! export-schema
PowerShell
gdal vector pipeline `
! read natural_earth_vector.gpkg --layer ne_50m_admin_0_countries `
! sql --sql "SELECT geom,name,abbrev,pop_est AS estimated_population FROM ne_50m_admin_0_countries" --output-layer "countries" `
! set-field-type --field-name "estimated_population" --field-type Integer `
! export-schema
>>>>>>>>> (AUTHORS)
Alessandro Pasotti
>>>>>>>> > >>>>> (COPYRIGHT)
1998-2026
August 18, 2026 GDAL-VECTOR-EXPORT-SCHEMA(1)