Skip to content
Snippets Groups Projects
Commit 0b705222 authored by Jonathan Guinet's avatar Jonathan Guinet
Browse files

BUG: Transmercator FalseEasting and Northing is not set to ossim projection.

parent a6c49dda
No related branches found
No related tags found
No related merge requests found
...@@ -348,12 +348,14 @@ void MapProjectionAdapter::ApplyParametersToProjection() ...@@ -348,12 +348,14 @@ void MapProjectionAdapter::ApplyParametersToProjection()
if (it != m_ParameterStore.end()) if (it != m_ParameterStore.end())
{ {
double value = atof((*it).second.c_str()); double value = atof((*it).second.c_str());
projection->setFalseNorthing(value); projection->setFalseNorthing(value);
} }
it = m_ParameterStore.find("FalseEasting"); it = m_ParameterStore.find("FalseEasting");
if (it != m_ParameterStore.end()) if (it != m_ParameterStore.end())
{ {
double value = atof((*it).second.c_str()); double value = atof((*it).second.c_str());
projection->setFalseEasting(value); projection->setFalseEasting(value);
} }
it = m_ParameterStore.find("StandardParallel1"); it = m_ParameterStore.find("StandardParallel1");
...@@ -427,16 +429,28 @@ void MapProjectionAdapter::ApplyParametersToProjection() ...@@ -427,16 +429,28 @@ void MapProjectionAdapter::ApplyParametersToProjection()
} }
} }
// Apply parameters to trasnmercator // Apply parameters to transmercator
if (projectionName.compare("ossimTransMercatorProjection") == 0) if (projectionName.compare("ossimTransMercatorProjection") == 0)
{ {
ossimTransMercatorProjection* projection = dynamic_cast<ossimTransMercatorProjection*>(this->GetMapProjection()); ossimTransMercatorProjection* projection = dynamic_cast<ossimTransMercatorProjection*> (this->GetMapProjection());
it = m_ParameterStore.find("ScaleFactor"); it = m_ParameterStore.find("ScaleFactor");
if (it != m_ParameterStore.end()) if (it != m_ParameterStore.end())
{ {
double scale = atof((*it).second.c_str()); double scale = atof((*it).second.c_str());
projection->setScaleFactor(scale); projection->setScaleFactor(scale);
} }
it = m_ParameterStore.find("FalseNorthing");
if (it != m_ParameterStore.end())
{
double value = atof((*it).second.c_str());
projection->setFalseNorthing(value);
}
it = m_ParameterStore.find("FalseEasting");
if (it != m_ParameterStore.end())
{
double value = atof((*it).second.c_str());
projection->setFalseEasting(value);
}
} }
// Apply parameters to Utm // Apply parameters to Utm
......
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