diff --git a/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx b/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx index c85044a944c31b963eb655ec6ad3fea47e44c297..2aa504e95c907cab9235083c5b5b865cef44bfa7 100644 --- a/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx +++ b/Code/Projections/otbElevDatabaseHeightAboveMSLFunction.txx @@ -76,16 +76,7 @@ ElevDatabaseHeightAboveMSLFunction<TOutputPixel, TCoordRep, NPointDimension> ossimWorldPoint.lat = point[1]; height = m_ElevManager->getHeightAboveMSL(ossimWorldPoint); - if (!ossim::isnan(height)) - { - return static_cast<PixelType>( height ); - } - else - { - // Back to the MNT default value - return static_cast<PixelType>( m_DefaultUnknownValue ); - } - + return static_cast<PixelType>( height ); } template <class TOutputPixel, class TCoordRep, unsigned int NPointDimension> diff --git a/Examples/Visualization/VectorDataRendering.cxx b/Examples/Visualization/VectorDataRendering.cxx index 427649911852403f24d19d9143d97658b8e5178d..bc766af6e4913913550672901af81bb5efa0df58 100644 --- a/Examples/Visualization/VectorDataRendering.cxx +++ b/Examples/Visualization/VectorDataRendering.cxx @@ -101,7 +101,7 @@ int main( int argc, char * argv[] ) ReaderType::Pointer reader = ReaderType::New(); reader->SetFileName(infname); reader->UpdateOutputInformation(); - std::cout << "NumBands: " << reader->GetOutput()->GetNumberOfComponentsPerPixel() << std::endl; + //std::cout << "NumBands: " << reader->GetOutput()->GetNumberOfComponentsPerPixel() << std::endl; // Instantiation of the visualization elements typedef otb::ImageLayerRenderingModel<OutputImageType> ModelType; @@ -181,12 +181,14 @@ int main( int argc, char * argv[] ) vectorDataRendering->SetSpacing(spacing); vectorDataRendering->SetScaleFactor(2.4); if (inFont) + { vectorDataRendering->SetFontFileName(fontfilename); + vectorDataRendering->AddStyle("roads-text"); + } // set up the style we want to use vectorDataRendering->AddStyle("minor-roads-casing"); vectorDataRendering->AddStyle("minor-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 // render the same roads (only the main one). @@ -194,7 +196,7 @@ int main( int argc, char * argv[] ) vectorDataRenderingQL->SetInput(projection->GetOutput()); double qlRatio = generator->GetOptimalSubSamplingRate(); - std::cout << "Subsampling for QL: " << qlRatio << std::endl; + //std::cout << "Subsampling for QL: " << qlRatio << std::endl; ImageType::SizeType sizeQL; sizeQL[0] = size[0]/qlRatio; sizeQL[1] = size[1]/qlRatio; @@ -208,11 +210,14 @@ int main( int argc, char * argv[] ) vectorDataRenderingQL->SetSpacing(spacingQL); vectorDataRenderingQL->SetScaleFactor(2.4*qlRatio); if (inFont) + { vectorDataRenderingQL->SetFontFileName(fontfilename); + vectorDataRenderingQL->AddStyle("roads-text"); + } vectorDataRenderingQL->AddStyle("minor-roads-casing"); vectorDataRenderingQL->AddStyle("minor-roads"); vectorDataRenderingQL->AddStyle("roads"); - vectorDataRenderingQL->AddStyle("roads-text"); + // Now we are ready to create this second layer typedef otb::ImageLayer<OutputImageType, OutputImageType> LayerRGBAType;