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

BUG: correcting lon/lat inversion in KML

parent d99f0d5c
No related branches found
No related tags found
No related merge requests found
...@@ -590,11 +590,11 @@ namespace otb ...@@ -590,11 +590,11 @@ namespace otb
CoordinatesPtr coordinates = factory->CreateCoordinates(); CoordinatesPtr coordinates = factory->CreateCoordinates();
if(DataNodeType::Dimension>2) if(DataNodeType::Dimension>2)
{ {
coordinates->add_latlngalt(it.Get()->GetPoint()[0],it.Get()->GetPoint()[1],it.Get()->GetPoint()[2]); coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],it.Get()->GetPoint()[2]);
} }
else else
{ {
coordinates->add_latlng(it.Get()->GetPoint()[0],it.Get()->GetPoint()[1]); coordinates->add_latlng(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0]);
} }
// Create <Point> and give it <coordinates>. // Create <Point> and give it <coordinates>.
...@@ -638,11 +638,11 @@ namespace otb ...@@ -638,11 +638,11 @@ namespace otb
if(DataNodeType::Dimension>2) if(DataNodeType::Dimension>2)
{ {
coordinates->add_latlngalt(vIt.Value()[0],vIt.Value()[1],vIt.Value()[2]); coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],vIt.Value()[2]);
} }
else else
{ {
coordinates->add_latlng(vIt.Value()[0],vIt.Value()[1]); coordinates->add_latlng(vIt.Value()[1],vIt.Value()[0]);
} }
line->set_coordinates(coordinates); line->set_coordinates(coordinates);
++vIt; ++vIt;
...@@ -684,11 +684,11 @@ namespace otb ...@@ -684,11 +684,11 @@ namespace otb
{ {
if(DataNodeType::Dimension>2) if(DataNodeType::Dimension>2)
{ {
coordinates->add_latlngalt(vIt.Value()[0],vIt.Value()[1],vIt.Value()[2]); coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],vIt.Value()[2]);
} }
else else
{ {
coordinates->add_latlng(vIt.Value()[0],vIt.Value()[1]); coordinates->add_latlng(vIt.Value()[1],vIt.Value()[0]);
} }
line->set_coordinates(coordinates); line->set_coordinates(coordinates);
...@@ -709,11 +709,11 @@ namespace otb ...@@ -709,11 +709,11 @@ namespace otb
{ {
if(DataNodeType::Dimension>2) if(DataNodeType::Dimension>2)
{ {
coordinates->add_latlngalt(it.Get()->GetPoint()[0],it.Get()->GetPoint()[1],it.Get()->GetPoint()[2]); coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],it.Get()->GetPoint()[2]);
} }
else else
{ {
coordinates->add_latlng(it.Get()->GetPoint()[0],it.Get()->GetPoint()[1]); coordinates->add_latlng(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0]);
} }
line->set_coordinates(coordinates); line->set_coordinates(coordinates);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
namespace otb namespace otb
{ {
/** \class KMLVectorDataIOFactory /** \class KMLVectorDataIOFactory
* \brief Creation d'un instance d'un objet VectorDataImageIO utilisant les object factory. * \brief Creating an instance of a VectorDataImageIO object using object factory.
*/ */
template <class TData> class ITK_EXPORT KMLVectorDataIOFactory : public itk::ObjectFactoryBase template <class TData> class ITK_EXPORT KMLVectorDataIOFactory : public itk::ObjectFactoryBase
{ {
......
...@@ -53,7 +53,7 @@ public: ...@@ -53,7 +53,7 @@ public:
/** \class VectorDataFileWriter /** \class VectorDataFileWriter
* \brief This class writes the ShapeFile format * \brief This class writes vector data file format (shapefile and KML)
* *
* \ingroup IO * \ingroup IO
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment