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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
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
David Youssefi
otb
Commits
a5a55452
Commit
a5a55452
authored
12 years ago
by
Arnaud Jaen
Browse files
Options
Downloads
Patches
Plain Diff
BUG: Handle the case of shapefile for the GetLayer method in FusionOGRTileFilter.
parent
04650906
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/OBIA/otbFusionOGRTileFilter.txx
+6
-1
6 additions, 1 deletion
Code/OBIA/otbFusionOGRTileFilter.txx
with
6 additions
and
1 deletion
Code/OBIA/otbFusionOGRTileFilter.txx
+
6
−
1
View file @
a5a55452
...
...
@@ -105,7 +105,12 @@ FusionOGRTileFilter<TInputImage>
{
typename InputImageType::ConstPointer inputImage = this->GetInput();
OGRDataSourcePointerType inputDataSource = this->GetOGRDataSource();
OGRLayerType inputLayer = inputDataSource->GetLayerChecked(m_LayerName);
//Handle the case of shapefile. A shapefile is a layer and not a datasource.
//The layer name in a shapefile is the shapefile's name.
//This is not the case for a database as sqlite or PG.
OGRLayerType inputLayer = inputDataSource->GetLayersCount() == 1
? inputDataSource->GetLayer(0)
: inputDataSource->GetLayerChecked(m_LayerName);
//compute the number of stream division in row and column
SizeType imageSize = this->GetInput()->GetLargestPossibleRegion().GetSize();
...
...
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