1OGR_LAYER_ALGEBRA(1)                 GDAL                 OGR_LAYER_ALGEBRA(1)
2
3
4

NAME

6       ogr_layer_algebra - Performs various Vector layer algebraic operations
7
8       New in version 3.6.
9
10

SYNOPSIS

12          ogr_layer_algebra.py Union|Intersection|SymDifference|Identity|Update|Clip|Erase
13                              -input_ds name [-input_lyr name]
14                              -method_ds [-method_lyr name]
15                              -output_ds name [-output_lyr name] [-overwrite]
16                              [-opt NAME=VALUE]*
17                              [-f format_name] [-dsco NAME=VALUE]* [-lco NAME=VALUE]*
18                              [-input_fields NONE|ALL|fld1,fl2,...fldN] [-method_fields NONE|ALL|fld1,fl2,...fldN]
19                              [-nlt geom_type] [-a_srs srs_def]
20

DESCRIPTION

22       The  ogr_layer_algebra.py  provides  a  command line utility to perform
23       various vector layer algebraic operations. The utility takes  a  vector
24       input  source  , a method source and generates the output of the opera‐
25       tion in the specified output file
26
27       <mode> Where <mode> is one of the seven available modes:
28
29Union
30                   A union is a set of features, which  represent  areas  that
31                   are in either of the operand layers.
32
33Intersection
34                   An  intersection  is a set of features, which represent the
35                   common areas of two layers.
36
37SymDifference
38                   A symmetric difference is a set of features,  which  repre‐
39                   sent  areas that are in operand layers but which do not in‐
40                   tersect.
41
42Identity
43                   The identity method identifies features in the input  layer
44                   with  features  in the method layer possibly splitting fea‐
45                   tures into several features.  By default the  result  layer
46                   has attributes from both operand layers.
47
48Update
49                   The  update method creates a layer, which add features into
50                   the input layer from the method layer possibly cutting fea‐
51                   tures  in the input layer.  By default the result layer has
52                   attributes only from the input layer.
53
54Clip
55                   The clip method creates a layer, which  has  features  from
56                   the input layer clipped to the areas of the features in the
57                   method layer.  By default the result layer  has  attributes
58                   of the input layer.
59
60Erase
61                   The  erase  method creates a layer, which has features from
62                   the input layer whose areas are erased by the  features  in
63                   the  method  layer.   By  default  the result layer has at‐
64                   tributes of the input layer.
65
66       -input_ds <path>
67              Input data set path for the operation to be performed.  For  op‐
68              erations involving 2 datasets, this is one of the dataset.
69
70       -input_lyr <name>
71              Layer  name  of the input_ds for which the operations have to be
72              performed ( Optional )
73
74       -method_ds <path>
75              Method data set path for the operation to be performed.  This is
76              usually the conditional data set supplied to the operation ( ex:
77              clip , erase , update ) This is the Second data set in the oper‐
78              ation ( ex : Union, Intersection , SymDifference )
79
80       -method_lyr <name>
81              Layer  name of the method_ds for which the operations have to be
82              performed ( Optional )
83
84       -output_ds <path>
85              Output data set path for writing the result  of  the  operations
86              performed by ogr_layer_algebra
87
88       -output_lyr_name <name>
89              Layer name of the output_lyr_name where the output vector has to
90              be written. ( Optional )
91
92       -overwrite
93              Indicates whether the output_ds have to be overwritten with  the
94              generated result of ogr_layer_algebra
95
96       -opt <NAME=VALUE>
97              Attributes  for  which  the operation has to run on input_ds and
98              method_ds
99
100       -f <format_name>
101              Select the output format.If not specified, the format is guessed
102              from  the  extension  (previously  was ESRI Shapefile).  Use the
103              short format name
104
105       -dsco <NAME=VALUE>
106              Dataset creation option (format specific)
107
108       -lco <NAME=VALUE>
109              Layer creation option (format specific)
110
111       -input_fields <NONE|ALL|fld1,fld2,fld3...>
112              Comma-delimited list of fields from input layer to copy  to  the
113              output layer , if eligible according to the operation
114
115       -method_fields <NONE|ALL|fld1,fld2,fld3...>
116              Comma-delimited  list of fields from method layer to copy to the
117              output layer , if eligible according to the operation
118
119       -nlt <geom_type>
120              Define the geometry type for the created layer.   One  of  NONE,
121              GEOMETRY, POINT, LINESTRING, POLYGON, GEOMETRYCOLLECTION, MULTI‐
122              POINT, MULTIPOLYGON, GEOMETRY25D, POINT25D, LINESTRING25D, POLY‐
123              GON25D, GEOMETRYCOLLECTION25D, MULTIPOINT25D, MULTIPOLYGON25D.
124
125       -a_srs <srs_def>
126              Assign an output SRS, but without reprojecting
127
128              The coordinate reference systems that can be passed are anything
129              supported by  the  OGRSpatialReference.SetFromUserInput()  call,
130              which  includes EPSG Projected, Geographic or Compound CRS (i.e.
131              EPSG:4296), a well known text (WKT) CRS definition, PROJ.4  dec‐
132              larations, or the name of a .prj file containing a WKT CRS defi‐
133              nition.
134
136       1998-2023
137
138
139
140
141                                 Apr 17, 2023             OGR_LAYER_ALGEBRA(1)
Impressum