Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
0572dcd4
Commit
0572dcd4
authored
5 years ago
by
Cédric Traizet
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' into app_vector_regression
parents
b5ff3162
0dde3bf4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!648
Ci rcjob
,
!621
Release 7.0 (master)
,
!565
Application VectorRegression
Pipeline
#2456
passed
5 years ago
Stage: precheck
Stage: prepare
Stage: build
Stage: report
Stage: external
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx
+14
-2
14 additions, 2 deletions
...Applications/AppSegmentation/app/otbLSMSVectorization.cxx
with
14 additions
and
2 deletions
Modules/Applications/AppSegmentation/app/otbLSMSVectorization.cxx
+
14
−
2
View file @
0572dcd4
...
...
@@ -292,7 +292,7 @@ private:
//Creation of a multipolygon where are stored the geometries to be merged
OGRMultiPolygon
geomToMerge
;
geomToMerge
.
addGeometry
(
firstFeature
.
GetGeometry
());
AddValidGeometry
(
geomToMerge
,
firstFeature
.
GetGeometry
());
bool
merging
=
true
;
otb
::
ogr
::
Feature
nextFeature
(
nullptr
);
bool
haveMerged
=
false
;
...
...
@@ -309,7 +309,7 @@ private:
//Storing of the new geometry if labels are identical
if
(
merging
)
{
geomToMerge
.
addGeometry
(
nextFeature
.
GetGeometry
());
AddValidGeometry
(
geomToMerge
,
nextFeature
.
GetGeometry
());
layer
.
DeleteFeature
(
nextFeature
.
GetFID
());
haveMerged
=
true
;
}
...
...
@@ -378,6 +378,18 @@ private:
otbAppLogINFO
(
<<
"Elapsed time: "
<<
(
double
)(
toc
-
tic
)
/
CLOCKS_PER_SEC
<<
" seconds"
);
}
void
AddValidGeometry
(
OGRMultiPolygon
&
multi
,
OGRGeometry
const
*
g
)
{
if
(
g
->
IsValid
())
{
multi
.
addGeometry
(
g
);
}
else
{
multi
.
addGeometryDirectly
(
g
->
Simplify
(
0.0
)
);
}
}
};
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment