My Project
Public Attributes | List of all members
GDALVectorTranslateOptions Struct Reference

Public Attributes

bool bSkipFailures
 
int nLayerTransaction
 
bool bForceTransaction
 
int nGroupTransactions
 
GIntBig nFIDToFetch
 
bool bQuiet
 
char * pszFormat
 
char ** papszLayers
 
char ** papszDSCO
 
char ** papszLCO
 
GDALVectorTranslateAccessMode eAccessMode
 
bool bAddMissingFields
 
bool bTransform
 
char * pszOutputSRSDef
 
char * pszSourceSRSDef
 
bool bNullifyOutputSRS
 
bool bExactFieldNameMatch
 
char * pszNewLayerName
 
char * pszWHERE
 
char * pszGeomField
 
char ** papszSelFields
 
char * pszSQLStatement
 
char * pszDialect
 
int eGType
 
GeomTypeConversion eGeomTypeConversion
 
GeomOperation eGeomOp
 
double dfGeomOpParam
 
char ** papszFieldTypesToString
 
char ** papszMapFieldType
 
bool bUnsetFieldWidth
 
bool bDisplayProgress
 
bool bWrapDateline
 
double dfDateLineOffset
 
bool bClipSrc
 
OGRGeometryH hClipSrc
 
char * pszClipSrcDS
 
char * pszClipSrcSQL
 
char * pszClipSrcLayer
 
char * pszClipSrcWhere
 
OGRGeometryH hClipDst
 
char * pszClipDstDS
 
char * pszClipDstSQL
 
char * pszClipDstLayer
 
char * pszClipDstWhere
 
bool bSplitListFields
 
int nMaxSplitListSubFields
 
bool bExplodeCollections
 
char * pszZField
 
char ** papszFieldMap
 
int nCoordDim
 
char ** papszDestOpenOptions
 
bool bForceNullable
 
bool bUnsetDefault
 
bool bUnsetFid
 
bool bPreserveFID
 
bool bCopyMD
 
char ** papszMetadataOptions
 
char * pszSpatSRSDef
 
int nGCPCount
 
GDAL_GCP * pasGCPs
 
int nTransformOrder
 
OGRGeometryH hSpatialFilter
 
GDALProgressFunc pfnProgress
 
void * pProgressData
 
bool bNativeData
 
GIntBig nLimit
 

Detailed Description

Options for use with GDALVectorTranslate(). GDALVectorTranslateOptions* must be allocated and freed with GDALVectorTranslateOptionsNew() and GDALVectorTranslateOptionsFree() respectively.

Member Data Documentation

◆ bAddMissingFields

bool GDALVectorTranslateOptions::bAddMissingFields

It has the effect of adding, to existing target layers, the new fields found in source layers. This option is useful when merging files that have non-strictly identical structures. This might not work for output formats that don't support adding fields to existing non-empty layers.

◆ bClipSrc

bool GDALVectorTranslateOptions::bClipSrc

clip geometries when it is set to true

◆ bCopyMD

bool GDALVectorTranslateOptions::bCopyMD

set it to false to disable copying of metadata from source dataset and layers into target dataset and layers, when supported by output driver.

◆ bDisplayProgress

bool GDALVectorTranslateOptions::bDisplayProgress

display progress on terminal. Only works if input layers have the "fast feature count" capability

◆ bExactFieldNameMatch

bool GDALVectorTranslateOptions::bExactFieldNameMatch

If set to false, then field name matching between source and existing target layer is done in a more relaxed way if the target driver has an implementation for it.

◆ bExplodeCollections

bool GDALVectorTranslateOptions::bExplodeCollections

produce one feature for each geometry in any kind of geometry collection in the source file

◆ bForceNullable

bool GDALVectorTranslateOptions::bForceNullable

If set to true, does not propagate not-nullable constraints to target layer if they exist in source layer

◆ bForceTransaction

bool GDALVectorTranslateOptions::bForceTransaction

force the use of particular transaction type based on GDALVectorTranslate::nLayerTransaction

◆ bNativeData

bool GDALVectorTranslateOptions::bNativeData

Whether layer and feature native data must be transferred.

◆ bPreserveFID

bool GDALVectorTranslateOptions::bPreserveFID

use the FID of the source features instead of letting the output driver to automatically assign a new one. If not in append mode, this behaviour becomes the default if the output driver has a FID layer creation option. In which case the name of the source FID column will be used and source feature IDs will be attempted to be preserved. This behaviour can be disabled by option GDALVectorTranslateOptions::bUnsetFid

◆ bQuiet

bool GDALVectorTranslateOptions::bQuiet

allow or suppress progress monitor and other non-error output

◆ bSkipFailures

bool GDALVectorTranslateOptions::bSkipFailures

continue after a failure, skipping the failed feature

◆ bSplitListFields

bool GDALVectorTranslateOptions::bSplitListFields

split fields of type StringList, RealList or IntegerList into as many fields of type String, Real or Integer as necessary.

◆ bTransform

bool GDALVectorTranslateOptions::bTransform

It must be set to true to trigger reprojection, otherwise only SRS assignment is done.

◆ bUnsetDefault

bool GDALVectorTranslateOptions::bUnsetDefault

If set to true, does not propagate default field values to target layer if they exist in source layer

◆ bUnsetFid

bool GDALVectorTranslateOptions::bUnsetFid

to prevent the new default behaviour that consists in, if the output driver has a FID layer creation option and we are not in append mode, to preserve the name of the source FID column and source feature IDs

◆ bUnsetFieldWidth

bool GDALVectorTranslateOptions::bUnsetFieldWidth

set field width and precision to 0

◆ bWrapDateline

bool GDALVectorTranslateOptions::bWrapDateline

split geometries crossing the dateline meridian

◆ dfDateLineOffset

double GDALVectorTranslateOptions::dfDateLineOffset

offset from dateline in degrees (default long. = +/- 10deg, geometries within 170deg to -170deg will be split)

◆ dfGeomOpParam

double GDALVectorTranslateOptions::dfGeomOpParam

the parameter to geometric operation

◆ eAccessMode

GDALVectorTranslateAccessMode GDALVectorTranslateOptions::eAccessMode

access modes

◆ eGeomOp

GeomOperation GDALVectorTranslateOptions::eGeomOp

Geometric operation to perform

◆ eGType

int GDALVectorTranslateOptions::eGType

the geometry type for the created layer

◆ hSpatialFilter

OGRGeometryH GDALVectorTranslateOptions::hSpatialFilter

spatial query extents, in the SRS of the source layer(s) (or the one specified with GDALVectorTranslateOptions::pszSpatSRSDef). Only features whose geometry intersects the extents will be selected. The geometries will not be clipped unless GDALVectorTranslateOptions::bClipSrc is true.

◆ nCoordDim

int GDALVectorTranslateOptions::nCoordDim

force the coordinate dimension to nCoordDim (valid values are 2 or 3). This affects both the layer geometry type, and feature geometries.

◆ nFIDToFetch

GIntBig GDALVectorTranslateOptions::nFIDToFetch

If provided, only the feature with this feature id will be reported. Operates exclusive of the spatial or attribute queries. Note: if you want to select several features based on their feature id, you can also use the fact the 'fid' is a special field recognized by OGR SQL. So GDALVectorTranslateOptions::pszWHERE = "fid in (1,3,5)" would select features 1, 3 and 5.

◆ nGCPCount

int GDALVectorTranslateOptions::nGCPCount

◆ nGroupTransactions

int GDALVectorTranslateOptions::nGroupTransactions

group nGroupTransactions features per transaction (default 20000). Increase the value for better performance when writing into DBMS drivers that have transaction support. nGroupTransactions can be set to -1 to load the data into a single transaction

◆ nLayerTransaction

int GDALVectorTranslateOptions::nLayerTransaction

use layer level transaction. If set to FALSE, then it is interpreted as dataset level transaction.

◆ nLimit

GIntBig GDALVectorTranslateOptions::nLimit

Maximum number of features, or -1 if no limit.

◆ nMaxSplitListSubFields

int GDALVectorTranslateOptions::nMaxSplitListSubFields

limit the number of subfields created for each split field.

◆ nTransformOrder

int GDALVectorTranslateOptions::nTransformOrder

order of polynomial used for warping (1 to 3). The default is to select a polynomial order based on the number of GCPs

◆ papszDestOpenOptions

char** GDALVectorTranslateOptions::papszDestOpenOptions

destination dataset open option (format specific), only valid in update mode

◆ papszDSCO

char** GDALVectorTranslateOptions::papszDSCO

dataset creation option (format specific)

◆ papszFieldMap

char** GDALVectorTranslateOptions::papszFieldMap

the list of field indexes to be copied from the source to the destination. The (n)th value specified in the list is the index of the field in the target layer definition in which the n(th) field of the source layer must be copied. Index count starts at zero. There must be exactly as many values in the list as the count of the fields in the source layer. We can use the "identity" option to specify that the fields should be transferred by using the same order. This option should be used along with the GDALVectorTranslateOptions::eAccessMode = ACCESS_APPEND option.

◆ papszFieldTypesToString

char** GDALVectorTranslateOptions::papszFieldTypesToString

list of field types to convert to a field of type string in the destination layer. Valid types are: Integer, Integer64, Real, String, Date, Time, DateTime, Binary, IntegerList, Integer64List, RealList, StringList. Special value "All" can be used to convert all fields to strings. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query. Note that this does not influence the field types used by the source driver, and is only an afterwards conversion.

◆ papszLayers

char** GDALVectorTranslateOptions::papszLayers

list of layers of the source dataset which needs to be selected

◆ papszLCO

char** GDALVectorTranslateOptions::papszLCO

layer creation option (format specific)

◆ papszMapFieldType

char** GDALVectorTranslateOptions::papszMapFieldType

list of field types and the field type after conversion in the destination layer. ("srctype1=dsttype1","srctype2=dsttype2",...). Valid types are : Integer, Integer64, Real, String, Date, Time, DateTime, Binary, IntegerList, Integer64List, RealList, StringList. Types can also include subtype between parenthesis, such as Integer(Boolean), Real(Float32), ... Special value "All" can be used to convert all fields to another type. This is an alternate way to using the CAST operator of OGR SQL, that may avoid typing a long SQL query. This is a generalization of GDALVectorTranslateOptions::papszFieldTypeToString. Note that this does not influence the field types used by the source driver, and is only an afterwards conversion.

◆ papszMetadataOptions

char** GDALVectorTranslateOptions::papszMetadataOptions

list of metadata key and value to set on the output dataset, when supported by output driver. ("META-TAG1=VALUE1","META-TAG2=VALUE2")

◆ papszSelFields

char** GDALVectorTranslateOptions::papszSelFields

list of fields from input layer to copy to the new layer. A field is skipped if mentioned previously in the list even if the input layer has duplicate field names. (Defaults to all; any field is skipped if a subsequent field with same name is found.) Geometry fields can also be specified in the list.

◆ pasGCPs

GDAL_GCP* GDALVectorTranslateOptions::pasGCPs

list of ground control points to be added

◆ pfnProgress

GDALProgressFunc GDALVectorTranslateOptions::pfnProgress

the progress function to use

◆ pProgressData

void* GDALVectorTranslateOptions::pProgressData

pointer to the progress data variable

◆ pszClipDstDS

char* GDALVectorTranslateOptions::pszClipDstDS

destination clip datasource

◆ pszClipDstLayer

char* GDALVectorTranslateOptions::pszClipDstLayer

selected named layer from the destination clip datasource

◆ pszClipDstSQL

char* GDALVectorTranslateOptions::pszClipDstSQL

select desired geometries using an SQL query

◆ pszClipDstWhere

char* GDALVectorTranslateOptions::pszClipDstWhere

restrict desired geometries based on attribute query

◆ pszClipSrcDS

char* GDALVectorTranslateOptions::pszClipSrcDS

clip datasource

◆ pszClipSrcLayer

char* GDALVectorTranslateOptions::pszClipSrcLayer

selected named layer from the source clip datasource

◆ pszClipSrcSQL

char* GDALVectorTranslateOptions::pszClipSrcSQL

select desired geometries using an SQL query

◆ pszClipSrcWhere

char* GDALVectorTranslateOptions::pszClipSrcWhere

restrict desired geometries based on attribute query

◆ pszDialect

char* GDALVectorTranslateOptions::pszDialect

SQL dialect. In some cases can be used to use (unoptimized) OGR SQL instead of the native SQL of an RDBMS by using "OGRSQL". The "SQLITE" dialect can also be used with any datasource.

◆ pszFormat

char* GDALVectorTranslateOptions::pszFormat

output file format name (default is ESRI Shapefile)

◆ pszGeomField

char* GDALVectorTranslateOptions::pszGeomField

name of the geometry field on which the spatial filter operates on.

◆ pszNewLayerName

char* GDALVectorTranslateOptions::pszNewLayerName

an alternate name to the new layer

◆ pszOutputSRSDef

char* GDALVectorTranslateOptions::pszOutputSRSDef

output SRS. GDALVectorTranslateOptions::bTransform must be set to true to trigger reprojection, otherwise only SRS assignment is done.

◆ pszSourceSRSDef

char* GDALVectorTranslateOptions::pszSourceSRSDef

override source SRS

◆ pszSpatSRSDef

char* GDALVectorTranslateOptions::pszSpatSRSDef

override spatial filter SRS

◆ pszSQLStatement

char* GDALVectorTranslateOptions::pszSQLStatement

SQL statement to execute. The resulting table/layer will be saved to the output.

◆ pszWHERE

char* GDALVectorTranslateOptions::pszWHERE

attribute query (like SQL WHERE)

◆ pszZField

char* GDALVectorTranslateOptions::pszZField

uses the specified field to fill the Z coordinates of geometries


The documentation for this struct was generated from the following file: