Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
0ab9234f
Commit
0ab9234f
authored
May 02, 2012
by
Luc Hermitte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: Support of old GDAL 1.6.x version
parent
16a15c11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.cxx
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.cxx
+5
-0
Code/UtilitiesAdapters/OGRAdapters/otbOGRGeometryWrapper.cxx
Code/UtilitiesAdapters/OGRAdapters/otbOGRGeometryWrapper.cxx
+5
-0
Code/UtilitiesAdapters/OGRAdapters/otbOGRLayerWrapper.cxx
Code/UtilitiesAdapters/OGRAdapters/otbOGRLayerWrapper.cxx
+5
-0
No files found.
Code/UtilitiesAdapters/OGRAdapters/otbOGRFeatureWrapper.cxx
View file @
0ab9234f
...
...
@@ -66,7 +66,12 @@ void otb::ogr::Feature::SetFrom(Feature const& rhs, bool mustForgive)
void
otb
::
ogr
::
Feature
::
SetFrom
(
Feature
const
&
rhs
,
int
*
map
,
bool
mustForgive
)
{
CheckInvariants
();
#if GDAL_VERSION_NUM >= 1900
m_Feature
->
SetFrom
(
&
rhs
.
ogr
(),
map
,
mustForgive
);
#else
itkGenericExceptionMacro
(
"OGRLayer::SetFrom(feature, fieldmap, forgive) is not supported by OGR v"
<<
GDAL_VERSION_NUM
<<
". Upgrade to a version >= 1.9.0, and recompile OTB."
)
#endif
}
/*===========================================================================*/
...
...
Code/UtilitiesAdapters/OGRAdapters/otbOGRGeometryWrapper.cxx
View file @
0ab9234f
...
...
@@ -96,7 +96,12 @@ otb::ogr::UniqueGeometryPtr otb::ogr::Union(OGRGeometry const& lhs, OGRGeometry
otb
::
ogr
::
UniqueGeometryPtr
otb
::
ogr
::
UnionCascaded
(
OGRGeometry
const
&
this_
)
{
#if GDAL_VERSION_NUM >= 1800
return
UniqueGeometryPtr
(
this_
.
UnionCascaded
());
#else
itkGenericExceptionMacro
(
"OGRLayer::UnionCascaded is not supported by OGR v"
<<
GDAL_VERSION_NUM
<<
". Upgrade to a version >= 1.8.0, and recompile OTB."
)
#endif
}
otb
::
ogr
::
UniqueGeometryPtr
otb
::
ogr
::
Difference
(
OGRGeometry
const
&
lhs
,
OGRGeometry
const
&
rhs
)
...
...
Code/UtilitiesAdapters/OGRAdapters/otbOGRLayerWrapper.cxx
View file @
0ab9234f
...
...
@@ -301,12 +301,17 @@ void otb::ogr::Layer::ReorderFields(int * map)
void
otb
::
ogr
::
Layer
::
SetIgnoredFields
(
char
const
**
fieldNames
)
{
assert
(
m_Layer
&&
"OGRLayer not initialized"
);
#if GDAL_VERSION_NUM >= 1900
const
OGRErr
res
=
m_Layer
->
SetIgnoredFields
(
fieldNames
);
if
(
res
!=
OGRERR_NONE
)
{
itkGenericExceptionMacro
(
<<
"Cannot set fields to ignore on the layer <"
<<
GetName
()
<<
">:"
<<
CPLGetLastErrorMsg
());
}
#else
itkGenericExceptionMacro
(
"OGRLayer::SetIgnoredFields is not supported by OGR v"
<<
GDAL_VERSION_NUM
<<
". Upgrade to a version >= 1.9.0, and recompile OTB."
)
#endif
}
OGRwkbGeometryType
otb
::
ogr
::
Layer
::
GetGeomType
()
const
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment