Skip to content
Snippets Groups Projects
Commit 7e218bed authored by Mickael Savinaud's avatar Mickael Savinaud
Browse files

MRG

parents c18436f4 8116ce3b
Branches
Tags
No related merge requests found
...@@ -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>
......
...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment