def Usage():
print( "Usage: ogr2ogr [--help-general] [-skipfailures] [-append] [-update] [-gt n]\n" + \
" [-select field_list] [-where restricted_where] \n" + \
" [-progress] [-sql <sql statement>] \n" + \
" [-spat xmin ymin xmax ymax] [-preserve_fid] [-fid FID]\n" + \
" [-a_srs srs_def] [-t_srs srs_def] [-s_srs srs_def]\n" + \
" [-f format_name] [-overwrite] [[-dsco NAME=VALUE] ...]\n" + \
" [-simplify tolerance]\n" + \
#// " [-segmentize max_dist] [-fieldTypeToString All|(type1[,type2]*)]\n" + \
" [-fieldTypeToString All|(type1[,type2]*)] [-explodecollections] \n" + \
" dst_datasource_name src_datasource_name\n" + \
" [-lco NAME=VALUE] [-nln name] [-nlt type] [-dim 2|3] [layer [layer ...]]\n" + \
"\n" + \
" -f format_name: output file format name, possible values are:")
for iDriver in range(ogr.GetDriverCount()):
poDriver = ogr.GetDriver(iDriver)
if poDriver.TestCapability( ogr.ODrCCreateDataSource ):
print( " -f \"" + poDriver.GetName() + "\"" )
print( " -append: Append to existing layer instead of creating new if it exists\n" + \
" -overwrite: delete the output layer and recreate it empty\n" + \
" -update: Open existing output datasource in update mode\n" + \
" -progress: Display progress on terminal. Only works if input layers have the \"fast feature count\" capability\n" + \
" -select field_list: Comma-delimited list of fields from input layer to\n" + \
" copy to the new layer (defaults to all)\n" + \
" -where restricted_where: Attribute query (like SQL WHERE)\n" + \
" -sql statement: Execute given SQL statement and save result.\n" + \
" -skipfailures: skip features or layers that fail to convert\n" + \
" -gt n: group n features per transaction (default 200)\n" + \
" -spat xmin ymin xmax ymax: spatial query extents\n" + \
" -simplify tolerance: distance tolerance for simplification.\n" + \
#//" -segmentize max_dist: maximum distance between 2 nodes.\n" + \
#//" Used to create intermediate points\n" + \
" -dsco NAME=VALUE: Dataset creation option (format specific)\n" + \
" -lco NAME=VALUE: Layer creation option (format specific)\n" + \
" -nln name: Assign an alternate name to the new layer\n" + \
" -nlt type: Force a geometry type for new layer. One of NONE, GEOMETRY,\n" + \
" POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTIPOINT,\n" + \
" MULTIPOLYGON, or MULTILINESTRING. Add \"25D\" for 3D layers.\n" + \
" Default is type of source layer.\n" + \
" -dim dimension: Force the coordinate dimension to the specified value.\n" + \
" -fieldTypeToString type1,...: Converts fields of specified types to\n" + \
" fields of type string in the new layer. Valid types are : \n" + \
" Integer, Real, String, Date, Time, DateTime, Binary, IntegerList, RealList,\n" + \
" StringList. Special value All can be used to convert all fields to strings.")
print(" -a_srs srs_def: Assign an output SRS\n"
" -t_srs srs_def: Reproject/transform to this SRS on output\n"
" -s_srs srs_def: Override source SRS\n"
"\n"
" Srs_def can be a full WKT definition (hard to escape properly),\n"
" or a well known definition (i.e. EPSG:4326) or a file with a WKT\n"
" definition." )
return False
评论列表
文章目录