forked from mathstuf/gdal-svn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMIGRATION_GUIDE.TXT
182 lines (120 loc) · 7 KB
/
MIGRATION_GUIDE.TXT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
MIGRATION GUIDE FROM GDAL 1.11 to GDAL 2.0
------------------------------------------
This file documents backwards incompatible changes. You are strongly encouraged
to read the relevant RFCs for details and rationale for those changes.
Changes to the Perl bindings API are listed in swig/perl/Changes-in-the-API-in-2.0.
A) RFC 46: Unification of GDAL and OGR driver models
Link: http://trac.osgeo.org/gdal/wiki/rfc46_gdal_ogr_unification
C++ API:
* OGRSFDriverRegistrar and OGRSFDriver are now deprecated. Use GDALDriverManager
and GDALDriver instead.
* The following methods from OGRSFDriverRegistrar are removed : Open(),
OpenShared(), ReleaseDataSource(), DeregisterDriver(), AutoLoadDrivers()
GetDriver() and GetDriverByName() now return a GDALDriver* instance.
* OGRDataSource::CreateLayer() specialized implementations should be renamed
as ICreateLayer() to benefit from layer creation options validation.
* OGRLayer::GetInfo() has been removed.
* All methods of OGRDataSource have been transfered to GDALDataset, except
SyncToDisk() that should now be implemented as FlushCache() in drivers.
* GDALOpenInfo::papszSiblingFiles member is now private. Use the new
GetSiblingFiles() method instead.
* GDALOpenInfo::fp member is replaced by fpL member of type VSILFILE*.
* OGRSFDriver::CopyDataSource() has been removed.
* GDALDriverManager::GetHome() and SetHome() have been removed.
Out-of-tree drivers :
* Read RFC 46 for the needed changes. Changes in GDALOpenInfo will impact GDAL
drivers. GDAL drivers should also declare SetMetadataItem( GDAL_DCAP_RASTER, "YES" ).
OGRDataSource::CreateLayer() and SyncToDisk() changes will affect OGR drivers.
Behaviour changes :
* GDALDriverManager::GetDriverCount() and GetDriver() return both raster and
vector drivers. The nature of a driver can be tested with the GDAL_DCAP_RASTER
and GDAL_DCAP_VECTOR driver metadata item.
* GetRefCount() starts at 1 for OGRDataSource instead of 0.
B) RFC 49: Curve geometries
Link: http://trac.osgeo.org/gdal/wiki/rfc49_curve_geometries
C/C++ API :
* Use of wkb25DBit macro is strongly discouraged, as not compatible with new
geometry types. Use wkbFlatten(), wkbHasZ(), wkbSetZ() instead
* OGRwkbGeometryType enumeration has new values.
Behaviour changes :
* GML, NAS, WFS, PostGIS, VRT, GeoPackage and CSV drivers can return non-linear geometries.
Applications that do not wish to get such geometries can call
OGRSetNonLinearGeometriesEnabledFlag(FALSE)
Out-of-tree drivers :
* Read RFC 49 for the needed changes. CreateFeature() and SetFeature() virtual
methods must be renamed ICreateFeature() and ISetFeature().
C) RFC 51: RasterIO() improvements : resampling and progress callback
Link: http://trac.osgeo.org/gdal/wiki/rfc51_rasterio_resampling_progress
Out-of-tree drivers :
* Read RFC 51 for the needed changes. GDALRasterBand and GDALDataset::IRasterIO()
take a new GDALRasterIOExtraArg* psExtraArg argument.
GDALRasterBand and GDALDataset::RasterIO() take a new
GDALRasterIOExtraArg* psExtraArg argument
D) RFC 31: OGR 64bit Integer Fields and FIDs
Link:http://trac.osgeo.org/gdal/wiki/rfc31_ogr_64
C++ API:
* OGRLayer::GetFeature(), OGRLayer::DeleteFeature(), OGRLayer::SetNextByIndex() take a GIntBig instead of a long
* OGRFeature::GetFID() and OGRLayer::GetFeatureCount() now returns a GIntBig
C API:
* OGR_L_GetFeature(), OGR_L_DeleteFeature(), OGR_L_SetNextByIndex() take a GIntBig instead of a long
* OGR_F_GetFID() and OGR_L_GetFeatureCount() now returns a GIntBig
Behaviour changes :
* OFTInteger64 and OFTIntegerList64 can be returned whereas OGRFieldType is returned.
Out-of-tree drivers :
* Virtual method signature change: OGRLayer::GetFeature(), OGRLayer::DeleteFeature(),
OGRLayer::SetNextByIndex() take a GIntBig argument instead of a long
* Virtual method signature change: OGRLayer::GetFeatureCount() now returns a GIntBig
* OGRFeature::GetFID() returns a GIntBig
E) RFC 52: Strict OGR SQL quoting
Link: http://trac.osgeo.org/gdal/wiki/rfc52_strict_sql_quoting
No API changes
Behaviour changes:
* Identifiers, i.e column names or table names, can no longer be quoted with
single quote characters, but must use double quote characters if quoting is
needed, conforming with SQL 92 syntax. Failure to do the change will not
necessarily need to verbose errors at runtime since an expression like
WHERE 'a_column_name' = 'a_value' will now always evaluate to FALSE whereas
it would have been interpreted as WHERE "a_column_name" = 'a_value" if
a_column_name was indeed a column name.
F) RFC 53: OGR not-null constraints and default values
Link: http://trac.osgeo.org/gdal/wiki/rfc53_ogr_notnull_default
API changes:
* OGRFieldDefn::SetDefault() now takes a const char* as argument.
OGRFieldDefn::GetDefaultRef() removed and replaced by GetDefault() that
returns a const char*
G) RFC 54: Dataset transactions
Link: http://trac.osgeo.org/gdal/wiki/rfc54_dataset_transactions
Only API additions.
Behaviour changes:
* As described in the RFC, subtle behaviour changes can be observed with the PG driver,
related to implicit transactions that were flushed before and are no longer now,
but this should hopefully be restricted to non-typical use cases. So some cases that "worked" before might
no longer work, but the new behaviour should hopefully be more understandable.
* The PG and SQLite drivers could accept apparently nested calls to StartTransaction()
(at the layer level). This is no longer possible since they are now redirected
to dataset transactions, that explicitely do not support it.
H) RFC 55: Refined SetFeature() and DeleteFeature() semantics
Link: http://trac.osgeo.org/gdal/wiki/rfc55_refined_setfeature_deletefeature_semantics
Behaviour changes:
* Drivers will now return OGRERR_NON_EXISTING_FEATURE when calling SetFeature()
or DeleteFeature() with a feature id that does not exist.
MIGRATION GUIDE FROM GDAL 1.10 to GDAL 1.11
-------------------------------------------
This file documents backwards incompatible changes.
C++ API:
* GDALRasterAttributeTable is now an abstract class.
See http://trac.osgeo.org/gdal/wiki/rfc40_enhanced_rat_support
The functionnality of GDAL 1.X GDALRasterAttributeTable is now in
GDALDefaultRasterAttributeTable.
OGR drivers :
* Due to RFC 41, if a OGR driver calls SetGeomType(wkbNone) on a layer,
it will be impossible to affect geometries to features of that layer.
This worked before, although it was inconsistant, but it does no longer now.
In the developmenet of RFC 41, the CSV and VRT drivers have been upgraded
to fix such errors.
Changes that should likely not impact anybody :
* OGRGeometry::exportToGEOS() and OGRGeometryFactory::createFromGEOS() now
take a GEOSContextHandle_t argument ( GEOS >= 3.1.0 )
* OGRGeometryFactory::getGEOSGeometryFactory() has been removed.
This method returned NULL since 2006
( http://trac.osgeo.org/gdal/changeset/9899/trunk/ogr/ogrgeometryfactory.cpp )