Skip to content
Snippets Groups Projects
Commit 101fc022 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

BUG: fix one bug introduced by e52936aea56d

parent 727a1894
No related branches found
No related tags found
No related merge requests found
......@@ -603,12 +603,18 @@ void GDALImageIO::InternalReadImageInformation()
m_Spacing[0] = VadfGeoTransform[1];
m_Spacing[1] = VadfGeoTransform[5];
//In this case, we are in a geographic projection
//In this case, we are in a geographic projection if no other cartographic information was already
// available
// FIXME is there any way to know if we are in WGS 84 ???
std::string projRef =
std::string projRef;
itk::ExposeMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projRef);
if (projRef.empty())
{
projRef =
"GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]";
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projRef);
itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projRef);
}
}
/* -------------------------------------------------------------------- */
......
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