Skip to content
Snippets Groups Projects
Commit 3a823e31 authored by Manuel Grizonnet's avatar Manuel Grizonnet
Browse files

Backed out changeset 1cb4a619c6a6

parent c7fd9afb
No related branches found
No related tags found
No related merge requests found
......@@ -1015,17 +1015,20 @@ VectorImageModel
// get the physical coordinates
if (!ToImage()->GetProjectionRef().empty())
{
cartoVector.push_back("Cartographic");
}
else
{
cartoVector.push_back("Physical");
}
//ossPhysical.str("");
//ossPhysical<<"[" << Xpc <<","<< Ypc << "]";
ossPhysicalX << Xpc;
ossPhysicalY << Ypc;
cartoVector.push_back(ossPhysicalX.str());
cartoVector.push_back(ossPhysicalY.str());
}
else
{
//No cartographic info available
cartoVector.push_back("");
cartoVector.push_back("");
}
// index in current Lod image
IndexType currentLodIndex;
......@@ -1034,18 +1037,6 @@ VectorImageModel
//
// get the LatLong
if (!ToImage()->GetProjectionRef().empty())
{
geoVector.push_back("Geographic(exact)");
}
else if (ToImage()->GetImageKeywordlist().GetSize() != 0)
{
geoVector.push_back("Geographic(using sensor model)");
}
else
{
geoVector.push_back("No geoinfo");
}
if ( ToImage()->GetBufferedRegion().IsInside(currentLodIndex))
{
......@@ -1088,9 +1079,6 @@ VectorImageModel
//displays geographic info when the user is scrolling over the QL
//
// compute the current ql index
if (!ToImage()->GetProjectionRef().empty() || ToImage()->GetImageKeywordlist().GetSize() != 0)
{
currentLodIndex[0] = (Xpc - GetQuicklookModel()->ToImage()->GetOrigin()[0])
/ vcl_abs(GetQuicklookModel()->ToImage()->GetSpacing()[0]);
currentLodIndex[1] = (Ypc - GetQuicklookModel()->ToImage()->GetOrigin()[1])
......@@ -1119,16 +1107,8 @@ VectorImageModel
geoVector.push_back(ossGeographicElevation.str());
}
}
else
{
//No geoinfo available
geoVector.push_back("");
geoVector.push_back("");
geoVector.push_back("");
}
}
geoList = ToQStringList( geoVector );
//
// Display the radiometry of the displayed channels
Settings::ChannelVector rgb;
......
......@@ -87,7 +87,7 @@ PixelDescriptionWidget
//
// Cartographic coordiantes
m_CartographicRootItem = new QTreeWidgetItem( GetDescriptionTree() );
//m_CartographicRootItem->setText(0, tr("Cartographic"));
m_CartographicRootItem->setText(0, tr("Cartographic"));
m_CartographicRootItem->setExpanded(true);
// m_CartographicItem = new QTreeWidgetItem( m_CartographicRootItem );
......@@ -96,7 +96,7 @@ PixelDescriptionWidget
//
// Geographic coordinates
m_GeographicRootItem = new QTreeWidgetItem( GetDescriptionTree() );
//m_GeographicRootItem->setText(0, tr("Geographic"));
m_GeographicRootItem->setText(0, tr("Geographic"));
m_GeographicRootItem->setExpanded(true);
//m_GeographicItem = new QTreeWidgetItem( m_GeographicRootItem );
......@@ -140,22 +140,20 @@ PixelDescriptionWidget
if (!currentPhysical.empty())
{
// fill with the new values
m_CartographicRootItem->setText(0, QString("%1").arg(currentPhysical[0]));
QTreeWidgetItem * iCartoXItem = new QTreeWidgetItem( m_CartographicRootItem );
iCartoXItem->setText(0,QString( tr("X") ));
iCartoXItem->setText(1, QString("%1").arg(currentPhysical[1] ) );
iCartoXItem->setText(1, QString("%1").arg(currentPhysical[0] ) );
QTreeWidgetItem * iCartoYItem = new QTreeWidgetItem( m_CartographicRootItem );
iCartoYItem->setText(0,QString( tr("Y") ));
iCartoYItem->setText(1, QString("%1").arg(currentPhysical[2] ) );
iCartoYItem->setText(1, QString("%1").arg(currentPhysical[1] ) );
}
}
/*******************************************************************************/
void
PixelDescriptionWidget
::OnCurrentGeographicUpdated(const QStringList& currentGeo)
::OnCurrentGeographicUpdated(const QStringList&/*const QString &*/ currentGeo)
{
// remove the previous QTreeWidgetItem of m_GeographicRootItem
while( m_GeographicRootItem->childCount()>0 )
......@@ -170,19 +168,17 @@ PixelDescriptionWidget
if (!currentGeo.empty())
{
// fill with the new values
m_GeographicRootItem->setText(0, QString("%1").arg(currentGeo[0]));
QTreeWidgetItem * iGeoLongItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoLongItem->setText(0,QString( tr("Long") ));
iGeoLongItem->setText(1, QString("%1").arg(currentGeo[1] ) );
QTreeWidgetItem * iGeoLatItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoLatItem->setText(0,QString( tr("Lat") ));
iGeoLatItem->setText(1, QString("%1").arg(currentGeo[2] ) );
QTreeWidgetItem * iGeoElevationItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoElevationItem->setText(0,QString( tr("Elevation") ));
// fill with the new values
QTreeWidgetItem * iGeoLongItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoLongItem->setText(0,QString( tr("Long") ));
iGeoLongItem->setText(1, QString("%1").arg(currentGeo[0] ) );
QTreeWidgetItem * iGeoLatItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoLatItem->setText(0,QString( tr("Lat") ));
iGeoLatItem->setText(1, QString("%1").arg(currentGeo[1] ) );
QTreeWidgetItem * iGeoElevationItem = new QTreeWidgetItem( m_GeographicRootItem );
iGeoElevationItem->setText(0,QString( tr("Elevation") ));
if(currentGeo.size() > 2)
{
iGeoElevationItem->setText(1, QString("%1").arg(currentGeo[2] ) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment