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
7e218bed
Commit
7e218bed
authored
14 years ago
by
Mickael Savinaud
Browse files
Options
Downloads
Plain Diff
MRG
parents
c18436f4
8116ce3b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx
+1
-10
1 addition, 10 deletions
Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx
Examples/Visualization/VectorDataRendering.cxx
+9
-4
9 additions, 4 deletions
Examples/Visualization/VectorDataRendering.cxx
with
10 additions
and
14 deletions
Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx
+
1
−
10
View file @
7e218bed
...
@@ -76,16 +76,7 @@ ElevDatabaseHeightAboveMSLFunction<TOutputPixel, TCoordRep, NPointDimension>
...
@@ -76,16 +76,7 @@ ElevDatabaseHeightAboveMSLFunction<TOutputPixel, TCoordRep, NPointDimension>
ossimWorldPoint.lat = point[1];
ossimWorldPoint.lat = point[1];
height = m_ElevManager->getHeightAboveMSL(ossimWorldPoint);
height = m_ElevManager->getHeightAboveMSL(ossimWorldPoint);
if (!ossim::isnan(height))
return static_cast<PixelType>( height );
{
return static_cast<PixelType>( height );
}
else
{
// Back to the MNT default value
return static_cast<PixelType>( m_DefaultUnknownValue );
}
}
}
template <class TOutputPixel, class TCoordRep, unsigned int NPointDimension>
template <class TOutputPixel, class TCoordRep, unsigned int NPointDimension>
...
...
This diff is collapsed.
Click to expand it.
Examples/Visualization/VectorDataRendering.cxx
+
9
−
4
View file @
7e218bed
...
@@ -101,7 +101,7 @@ int main( int argc, char * argv[] )
...
@@ -101,7 +101,7 @@ int main( int argc, char * argv[] )
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
reader
->
SetFileName
(
infname
);
reader
->
SetFileName
(
infname
);
reader
->
UpdateOutputInformation
();
reader
->
UpdateOutputInformation
();
std
::
cout
<<
"NumBands: "
<<
reader
->
GetOutput
()
->
GetNumberOfComponentsPerPixel
()
<<
std
::
endl
;
//
std::cout << "NumBands: " << reader->GetOutput()->GetNumberOfComponentsPerPixel() << std::endl;
// Instantiation of the visualization elements
// Instantiation of the visualization elements
typedef
otb
::
ImageLayerRenderingModel
<
OutputImageType
>
ModelType
;
typedef
otb
::
ImageLayerRenderingModel
<
OutputImageType
>
ModelType
;
...
@@ -181,12 +181,14 @@ int main( int argc, char * argv[] )
...
@@ -181,12 +181,14 @@ int main( int argc, char * argv[] )
vectorDataRendering
->
SetSpacing
(
spacing
);
vectorDataRendering
->
SetSpacing
(
spacing
);
vectorDataRendering
->
SetScaleFactor
(
2.4
);
vectorDataRendering
->
SetScaleFactor
(
2.4
);
if
(
inFont
)
if
(
inFont
)
{
vectorDataRendering
->
SetFontFileName
(
fontfilename
);
vectorDataRendering
->
SetFontFileName
(
fontfilename
);
vectorDataRendering
->
AddStyle
(
"roads-text"
);
}
// set up the style we want to use
// set up the style we want to use
vectorDataRendering
->
AddStyle
(
"minor-roads-casing"
);
vectorDataRendering
->
AddStyle
(
"minor-roads-casing"
);
vectorDataRendering
->
AddStyle
(
"minor-roads"
);
vectorDataRendering
->
AddStyle
(
"minor-roads"
);
vectorDataRendering
->
AddStyle
(
"roads"
);
vectorDataRendering
->
AddStyle
(
"roads"
);
vectorDataRendering
->
AddStyle
(
"roads-text"
);
// rendering of the quicklook: the quicklook is at an entire different scale, so we don't want to
// rendering of the quicklook: the quicklook is at an entire different scale, so we don't want to
// render the same roads (only the main one).
// render the same roads (only the main one).
...
@@ -194,7 +196,7 @@ int main( int argc, char * argv[] )
...
@@ -194,7 +196,7 @@ int main( int argc, char * argv[] )
vectorDataRenderingQL
->
SetInput
(
projection
->
GetOutput
());
vectorDataRenderingQL
->
SetInput
(
projection
->
GetOutput
());
double
qlRatio
=
generator
->
GetOptimalSubSamplingRate
();
double
qlRatio
=
generator
->
GetOptimalSubSamplingRate
();
std
::
cout
<<
"Subsampling for QL: "
<<
qlRatio
<<
std
::
endl
;
//
std::cout << "Subsampling for QL: " << qlRatio << std::endl;
ImageType
::
SizeType
sizeQL
;
ImageType
::
SizeType
sizeQL
;
sizeQL
[
0
]
=
size
[
0
]
/
qlRatio
;
sizeQL
[
0
]
=
size
[
0
]
/
qlRatio
;
sizeQL
[
1
]
=
size
[
1
]
/
qlRatio
;
sizeQL
[
1
]
=
size
[
1
]
/
qlRatio
;
...
@@ -208,11 +210,14 @@ int main( int argc, char * argv[] )
...
@@ -208,11 +210,14 @@ int main( int argc, char * argv[] )
vectorDataRenderingQL
->
SetSpacing
(
spacingQL
);
vectorDataRenderingQL
->
SetSpacing
(
spacingQL
);
vectorDataRenderingQL
->
SetScaleFactor
(
2.4
*
qlRatio
);
vectorDataRenderingQL
->
SetScaleFactor
(
2.4
*
qlRatio
);
if
(
inFont
)
if
(
inFont
)
{
vectorDataRenderingQL
->
SetFontFileName
(
fontfilename
);
vectorDataRenderingQL
->
SetFontFileName
(
fontfilename
);
vectorDataRenderingQL
->
AddStyle
(
"roads-text"
);
}
vectorDataRenderingQL
->
AddStyle
(
"minor-roads-casing"
);
vectorDataRenderingQL
->
AddStyle
(
"minor-roads-casing"
);
vectorDataRenderingQL
->
AddStyle
(
"minor-roads"
);
vectorDataRenderingQL
->
AddStyle
(
"minor-roads"
);
vectorDataRenderingQL
->
AddStyle
(
"roads"
);
vectorDataRenderingQL
->
AddStyle
(
"roads"
);
vectorDataRenderingQL
->
AddStyle
(
"roads-text"
);
// Now we are ready to create this second layer
// Now we are ready to create this second layer
typedef
otb
::
ImageLayer
<
OutputImageType
,
OutputImageType
>
LayerRGBAType
;
typedef
otb
::
ImageLayer
<
OutputImageType
,
OutputImageType
>
LayerRGBAType
;
...
...
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