OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
otb::MapFileProductWriter< TInputImage > Class Template Reference

#include <otbMapFileProductWriter.h>

+ Inheritance diagram for otb::MapFileProductWriter< TInputImage >:
+ Collaboration diagram for otb::MapFileProductWriter< TInputImage >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef VectorDataType::DataNodeType DataNodeType
 
typedef GenericRSResamplerType::Pointer GenericRSResamplerPointerType
 
typedef GenericRSResampleImageFilter< InputImageType, InputImageTypeGenericRSResamplerType
 
typedef InputImageType::IndexType IndexType
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef TransformType::InputPointType InputPointType
 
typedef InputImageType::InternalPixelType InternalPixelType
 
typedef VectorImage< OutputPixelTypeOutputImageType
 
typedef unsigned char OutputPixelType
 
typedef TransformType::OutputPointType OutputPointType
 
typedef itk::SmartPointer< SelfPointer
 
typedef DataNodeType::PolygonType PolygonType
 
typedef MapFileProductWriter Self
 
typedef InputImageType::SizeType SizeType
 
typedef StreamingShrinkImageFilter< InputImageType, InputImageTypeStreamingShrinkImageFilterType
 
typedef itk::ProcessObject Superclass
 
typedef GenericRSTransform TransformType
 
typedef VectorDataFileWriter< VectorDataTypeVectorDataFileWriterType
 
typedef VectorData< double, 2 > VectorDataType
 
typedef MultiChannelExtractROI< InternalPixelType, OutputPixelTypeVectorImageExtractROIFilterType
 
typedef VectorRescaleIntensityImageFilter< InputImageType, InputImageTypeVectorRescaleIntensityImageFilterType
 
typedef ImageFileWriter< OutputImageTypeVectorWriterType
 
typedef PolygonType::VertexType VertexType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
const InputImageTypeGetInput (void)
 
const InputImageTypeGetInput (unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int InputImageDimension = InputImageType::ImageDimension
 
InputImagePointer m_VectorImage
 
InputImagePointer m_ResampleVectorImage
 
VectorImageExtractROIFilterType::Pointer m_VectorImageExtractROIFilter
 
VectorWriterType::Pointer m_VectorWriter
 
StreamingShrinkImageFilterType::Pointer m_StreamingShrinkImageFilter
 
VectorRescaleIntensityImageFilterType::Pointer m_VectorRescaleIntensityImageFilter
 
TransformType::Pointer m_Transform
 
VectorDataType::Pointer m_VectorDataIndexTile
 
DataNodeType::Pointer m_Polygon
 
DataNodeType::Pointer m_Folder
 
GenericRSResamplerPointerType m_GenericRSResampler
 
unsigned int m_TileSize
 
unsigned int m_CurrentDepth
 
std::string m_FileName
 
std::string m_IndexShapeFileName
 
std::string m_CGIPath
 
std::string m_ShapeIndexPath
 
std::ofstream m_File
 
int m_SRID
 
virtual void SetFileName (const char *_arg)
 
virtual const char * GetFileName () const
 
virtual void SetTileSize (unsigned int _arg)
 
virtual unsigned int GetTileSize ()
 
virtual void SetCGIPath (const char *_arg)
 
virtual const char * GetCGIPath () const
 
virtual void SetShapeIndexPath (const char *_arg)
 
virtual const char * GetShapeIndexPath () const
 
void Update () override
 
virtual void SetSRID (int _arg)
 
 MapFileProductWriter ()
 
 ~MapFileProductWriter () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void Tiling ()
 
virtual void Write ()
 
 MapFileProductWriter (const Self &)=delete
 
void operator= (const Self &)=delete
 
virtual void Initialize ()
 
virtual void AddBBoxToIndexTile (OutputPointType lowerLeftCorner, OutputPointType lowerRightCorner, OutputPointType upperRightCorner, OutputPointType upperLeftCorner, unsigned int x, unsigned int y)
 
virtual void GenerateMapFile ()
 
void AddLayer ()
 
void InitializeVectorData ()
 

Detailed Description

template<class TInputImage>
class otb::MapFileProductWriter< TInputImage >

This class produces Map file product ie a file .map, the tiles to draw in a mapserver, and finally a shapefile which describe the tiles and where to find them on the disk.

This filter begins by tiling the input image. An accessor SetTileSize allows setting the size of each tile. For each tile generated, an entry is added to the shapefile to store the location where the file is saved on the disk. The product generated are a mapfile which is the configuration file for mapservers, a tile index and finally the tiles. This class allow the user to specify the cgi-bin used (SetCGIPath) and the directory where to store the index shapefile and the tiles via SetShapeIndexPath method

Note that this class reproject the input image in the projection defined by the SRID (via SetSRID() method) set by the user.

Definition at line 70 of file otbMapFileProductWriter.h.

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage >
typedef itk::SmartPointer<const Self> otb::MapFileProductWriter< TInputImage >::ConstPointer

Definition at line 77 of file otbMapFileProductWriter.h.

◆ DataNodeType

template<class TInputImage >
typedef VectorDataType::DataNodeType otb::MapFileProductWriter< TInputImage >::DataNodeType

Definition at line 98 of file otbMapFileProductWriter.h.

◆ GenericRSResamplerPointerType

template<class TInputImage >
typedef GenericRSResamplerType::Pointer otb::MapFileProductWriter< TInputImage >::GenericRSResamplerPointerType

Definition at line 119 of file otbMapFileProductWriter.h.

◆ GenericRSResamplerType

Definition at line 118 of file otbMapFileProductWriter.h.

◆ IndexType

template<class TInputImage >
typedef InputImageType::IndexType otb::MapFileProductWriter< TInputImage >::IndexType

Definition at line 89 of file otbMapFileProductWriter.h.

◆ InputImagePixelType

template<class TInputImage >
typedef InputImageType::PixelType otb::MapFileProductWriter< TInputImage >::InputImagePixelType

Definition at line 92 of file otbMapFileProductWriter.h.

◆ InputImagePointer

template<class TInputImage >
typedef InputImageType::Pointer otb::MapFileProductWriter< TInputImage >::InputImagePointer

Definition at line 90 of file otbMapFileProductWriter.h.

◆ InputImageRegionType

template<class TInputImage >
typedef InputImageType::RegionType otb::MapFileProductWriter< TInputImage >::InputImageRegionType

Definition at line 91 of file otbMapFileProductWriter.h.

◆ InputImageType

template<class TInputImage >
typedef TInputImage otb::MapFileProductWriter< TInputImage >::InputImageType

Some convenient typedefs.

Definition at line 83 of file otbMapFileProductWriter.h.

◆ InputPointType

template<class TInputImage >
typedef TransformType::InputPointType otb::MapFileProductWriter< TInputImage >::InputPointType

Definition at line 123 of file otbMapFileProductWriter.h.

◆ InternalPixelType

template<class TInputImage >
typedef InputImageType::InternalPixelType otb::MapFileProductWriter< TInputImage >::InternalPixelType

Definition at line 87 of file otbMapFileProductWriter.h.

◆ OutputImageType

template<class TInputImage >
typedef VectorImage<OutputPixelType> otb::MapFileProductWriter< TInputImage >::OutputImageType

Definition at line 95 of file otbMapFileProductWriter.h.

◆ OutputPixelType

template<class TInputImage >
typedef unsigned char otb::MapFileProductWriter< TInputImage >::OutputPixelType

Definition at line 94 of file otbMapFileProductWriter.h.

◆ OutputPointType

template<class TInputImage >
typedef TransformType::OutputPointType otb::MapFileProductWriter< TInputImage >::OutputPointType

Definition at line 124 of file otbMapFileProductWriter.h.

◆ Pointer

template<class TInputImage >
typedef itk::SmartPointer<Self> otb::MapFileProductWriter< TInputImage >::Pointer

Definition at line 76 of file otbMapFileProductWriter.h.

◆ PolygonType

template<class TInputImage >
typedef DataNodeType::PolygonType otb::MapFileProductWriter< TInputImage >::PolygonType

Definition at line 99 of file otbMapFileProductWriter.h.

◆ Self

template<class TInputImage >
typedef MapFileProductWriter otb::MapFileProductWriter< TInputImage >::Self

Standard class typedefs.

Definition at line 74 of file otbMapFileProductWriter.h.

◆ SizeType

template<class TInputImage >
typedef InputImageType::SizeType otb::MapFileProductWriter< TInputImage >::SizeType

Definition at line 88 of file otbMapFileProductWriter.h.

◆ StreamingShrinkImageFilterType

Definition at line 112 of file otbMapFileProductWriter.h.

◆ Superclass

template<class TInputImage >
typedef itk::ProcessObject otb::MapFileProductWriter< TInputImage >::Superclass

Definition at line 75 of file otbMapFileProductWriter.h.

◆ TransformType

template<class TInputImage >
typedef GenericRSTransform otb::MapFileProductWriter< TInputImage >::TransformType

Definition at line 122 of file otbMapFileProductWriter.h.

◆ VectorDataFileWriterType

template<class TInputImage >
typedef VectorDataFileWriter<VectorDataType> otb::MapFileProductWriter< TInputImage >::VectorDataFileWriterType

Definition at line 102 of file otbMapFileProductWriter.h.

◆ VectorDataType

template<class TInputImage >
typedef VectorData<double, 2> otb::MapFileProductWriter< TInputImage >::VectorDataType

Definition at line 97 of file otbMapFileProductWriter.h.

◆ VectorImageExtractROIFilterType

Multi channels Extract ROI filter.

Definition at line 106 of file otbMapFileProductWriter.h.

◆ VectorRescaleIntensityImageFilterType

Definition at line 115 of file otbMapFileProductWriter.h.

◆ VectorWriterType

template<class TInputImage >
typedef ImageFileWriter<OutputImageType> otb::MapFileProductWriter< TInputImage >::VectorWriterType

Definition at line 109 of file otbMapFileProductWriter.h.

◆ VertexType

template<class TInputImage >
typedef PolygonType::VertexType otb::MapFileProductWriter< TInputImage >::VertexType

Definition at line 100 of file otbMapFileProductWriter.h.

Constructor & Destructor Documentation

◆ MapFileProductWriter() [1/2]

template<class TInputImage >
otb::MapFileProductWriter< TInputImage >::MapFileProductWriter
protected

Constructor

Definition at line 35 of file otbMapFileProductWriter.hxx.

◆ ~MapFileProductWriter()

template<class TInputImage >
otb::MapFileProductWriter< TInputImage >::~MapFileProductWriter
overrideprotected

Destructor

Definition at line 52 of file otbMapFileProductWriter.hxx.

◆ MapFileProductWriter() [2/2]

template<class TInputImage >
otb::MapFileProductWriter< TInputImage >::MapFileProductWriter ( const Self )
privatedelete

Method to set the filename of the mapfile generated

Member Function Documentation

◆ AddBBoxToIndexTile()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::AddBBoxToIndexTile ( OutputPointType  lowerLeftCorner,
OutputPointType  lowerRightCorner,
OutputPointType  upperRightCorner,
OutputPointType  upperLeftCorner,
unsigned int  x,
unsigned int  y 
)
privatevirtual

MapFile IndexTule build

Add the bounding box and the location of the generated tile as field of the vectordata

Definition at line 417 of file otbMapFileProductWriter.hxx.

References otb::FEATURE_POLYGON.

◆ AddLayer()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::AddLayer
private

Add a layer to the mapfile

Definition at line 536 of file otbMapFileProductWriter.hxx.

◆ CreateAnother()

template<class TInputImage >
virtual::itk::LightObject::Pointer otb::MapFileProductWriter< TInputImage >::CreateAnother ( void  ) const

◆ GenerateMapFile()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::GenerateMapFile
privatevirtual

Method To Generate the mapFile

Write the mapFile on the disk

Definition at line 464 of file otbMapFileProductWriter.hxx.

◆ GetCGIPath()

template<class TInputImage >
virtual const char* otb::MapFileProductWriter< TInputImage >::GetCGIPath ( ) const
virtual

Method to set the filename of the mapfile generated

◆ GetFileName()

template<class TInputImage >
virtual const char* otb::MapFileProductWriter< TInputImage >::GetFileName ( ) const
virtual

Method to set the filename of the mapfile generated

◆ GetInput() [1/2]

template<class TInputImage >
const MapFileProductWriter< TInputImage >::InputImageType * otb::MapFileProductWriter< TInputImage >::GetInput ( unsigned int  idx)

Get the idx input

Definition at line 92 of file otbMapFileProductWriter.hxx.

◆ GetInput() [2/2]

template<class TInputImage >
const MapFileProductWriter< TInputImage >::InputImageType * otb::MapFileProductWriter< TInputImage >::GetInput ( void  )

Get the idx input

Definition at line 78 of file otbMapFileProductWriter.hxx.

◆ GetNameOfClass()

template<class TInputImage >
virtual const char* otb::MapFileProductWriter< TInputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

◆ GetShapeIndexPath()

template<class TInputImage >
virtual const char* otb::MapFileProductWriter< TInputImage >::GetShapeIndexPath ( ) const
virtual

Method to set the filename of the mapfile generated

◆ GetTileSize()

template<class TInputImage >
virtual unsigned int otb::MapFileProductWriter< TInputImage >::GetTileSize ( )
virtual

Method to set the filename of the mapfile generated

◆ Initialize()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::Initialize
privatevirtual

Method to initialize the variables

Initialize the path, the filename, the vectordata used to store each bounding box of a tile as a feature

Definition at line 135 of file otbMapFileProductWriter.hxx.

◆ InitializeVectorData()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::InitializeVectorData
private

Initialize vd

Initialize the vectordata to write

Definition at line 152 of file otbMapFileProductWriter.hxx.

References otb::DOCUMENT, otb::FOLDER, and otb::SpatialReference::FromEPSG().

◆ New()

template<class TInputImage >
static Pointer otb::MapFileProductWriter< TInputImage >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::operator= ( const Self )
privatedelete

Method to set the filename of the mapfile generated

◆ PrintSelf()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

Method to set the filename of the mapfile generated

Definition at line 561 of file otbMapFileProductWriter.hxx.

◆ SetCGIPath()

template<class TInputImage >
virtual void otb::MapFileProductWriter< TInputImage >::SetCGIPath ( const char *  _arg)
virtual

Set CGI filename path

◆ SetFileName()

template<class TInputImage >
virtual void otb::MapFileProductWriter< TInputImage >::SetFileName ( const char *  _arg)
virtual

Method to set the filename of the mapfile generated

◆ SetInput() [1/2]

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::SetInput ( const InputImageType image)
virtual

Get the idx input

Definition at line 60 of file otbMapFileProductWriter.hxx.

◆ SetInput() [2/2]

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::SetInput ( unsigned int  index,
const TInputImage *  image 
)
virtual

Get the idx input

Definition at line 68 of file otbMapFileProductWriter.hxx.

◆ SetShapeIndexPath()

template<class TInputImage >
virtual void otb::MapFileProductWriter< TInputImage >::SetShapeIndexPath ( const char *  _arg)
virtual

Set SahpePATH: the directory where to store the shapefile

◆ SetSRID()

template<class TInputImage >
virtual void otb::MapFileProductWriter< TInputImage >::SetSRID ( int  _arg)
virtual

Macro to set the SRID we want to project Data in

◆ SetTileSize()

template<class TInputImage >
virtual void otb::MapFileProductWriter< TInputImage >::SetTileSize ( unsigned int  _arg)
virtual

Set/Get the size of each tile

◆ Tiling()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::Tiling
protectedvirtual

Method for Tiling the input image

Do the tiling

Image statistics

TODO : Generate KML for this tile

GX LAT LON

END GX LAT LON

Definition at line 176 of file otbMapFileProductWriter.hxx.

References otb::SpatialReference::FromEPSG().

◆ Update()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::Update ( )
inlineoverride

Update Method : Call a porotected Write method

Definition at line 156 of file otbMapFileProductWriter.h.

References otb::Wrapper::XML::Write().

◆ Write()

template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::Write
protectedvirtual

Method for writing

Write launch the tiling and the mapFile generation and write on the disk the indexfile as a shapefile

Definition at line 103 of file otbMapFileProductWriter.hxx.

References otb::SpatialReference::FromEPSG(), and otbMsgDevMacro.

Member Data Documentation

◆ InputImageDimension

template<class TInputImage >
const unsigned int otb::MapFileProductWriter< TInputImage >::InputImageDimension = InputImageType::ImageDimension
static

Dimension of input image.

Definition at line 127 of file otbMapFileProductWriter.h.

◆ m_CGIPath

template<class TInputImage >
std::string otb::MapFileProductWriter< TInputImage >::m_CGIPath
private

Method to set the filename of the mapfile generated

Definition at line 228 of file otbMapFileProductWriter.h.

◆ m_CurrentDepth

template<class TInputImage >
unsigned int otb::MapFileProductWriter< TInputImage >::m_CurrentDepth
private

Method to set the filename of the mapfile generated

Definition at line 223 of file otbMapFileProductWriter.h.

◆ m_File

template<class TInputImage >
std::ofstream otb::MapFileProductWriter< TInputImage >::m_File
private

Method to set the filename of the mapfile generated

Definition at line 231 of file otbMapFileProductWriter.h.

◆ m_FileName

template<class TInputImage >
std::string otb::MapFileProductWriter< TInputImage >::m_FileName
private

Method to set the filename of the mapfile generated

Definition at line 226 of file otbMapFileProductWriter.h.

◆ m_Folder

template<class TInputImage >
DataNodeType::Pointer otb::MapFileProductWriter< TInputImage >::m_Folder
private

Method to set the filename of the mapfile generated

Definition at line 216 of file otbMapFileProductWriter.h.

◆ m_GenericRSResampler

template<class TInputImage >
GenericRSResamplerPointerType otb::MapFileProductWriter< TInputImage >::m_GenericRSResampler
private

Method to set the filename of the mapfile generated

Definition at line 219 of file otbMapFileProductWriter.h.

◆ m_IndexShapeFileName

template<class TInputImage >
std::string otb::MapFileProductWriter< TInputImage >::m_IndexShapeFileName
private

Method to set the filename of the mapfile generated

Definition at line 227 of file otbMapFileProductWriter.h.

◆ m_Polygon

template<class TInputImage >
DataNodeType::Pointer otb::MapFileProductWriter< TInputImage >::m_Polygon
private

Method to set the filename of the mapfile generated

Definition at line 215 of file otbMapFileProductWriter.h.

◆ m_ResampleVectorImage

template<class TInputImage >
InputImagePointer otb::MapFileProductWriter< TInputImage >::m_ResampleVectorImage
private

Method to set the filename of the mapfile generated

Definition at line 196 of file otbMapFileProductWriter.h.

◆ m_ShapeIndexPath

template<class TInputImage >
std::string otb::MapFileProductWriter< TInputImage >::m_ShapeIndexPath
private

Method to set the filename of the mapfile generated

Definition at line 229 of file otbMapFileProductWriter.h.

◆ m_SRID

template<class TInputImage >
int otb::MapFileProductWriter< TInputImage >::m_SRID
private

Method to set the filename of the mapfile generated

Definition at line 232 of file otbMapFileProductWriter.h.

◆ m_StreamingShrinkImageFilter

template<class TInputImage >
StreamingShrinkImageFilterType::Pointer otb::MapFileProductWriter< TInputImage >::m_StreamingShrinkImageFilter
private

Method to set the filename of the mapfile generated

Definition at line 205 of file otbMapFileProductWriter.h.

◆ m_TileSize

template<class TInputImage >
unsigned int otb::MapFileProductWriter< TInputImage >::m_TileSize
private

Method to set the filename of the mapfile generated

Definition at line 222 of file otbMapFileProductWriter.h.

◆ m_Transform

template<class TInputImage >
TransformType::Pointer otb::MapFileProductWriter< TInputImage >::m_Transform
private

Method to set the filename of the mapfile generated

Definition at line 211 of file otbMapFileProductWriter.h.

◆ m_VectorDataIndexTile

template<class TInputImage >
VectorDataType::Pointer otb::MapFileProductWriter< TInputImage >::m_VectorDataIndexTile
private

Method to set the filename of the mapfile generated

Definition at line 214 of file otbMapFileProductWriter.h.

◆ m_VectorImage

template<class TInputImage >
InputImagePointer otb::MapFileProductWriter< TInputImage >::m_VectorImage
private

Method to set the filename of the mapfile generated

Definition at line 195 of file otbMapFileProductWriter.h.

◆ m_VectorImageExtractROIFilter

template<class TInputImage >
VectorImageExtractROIFilterType::Pointer otb::MapFileProductWriter< TInputImage >::m_VectorImageExtractROIFilter
private

Method to set the filename of the mapfile generated

Definition at line 199 of file otbMapFileProductWriter.h.

◆ m_VectorRescaleIntensityImageFilter

template<class TInputImage >
VectorRescaleIntensityImageFilterType::Pointer otb::MapFileProductWriter< TInputImage >::m_VectorRescaleIntensityImageFilter
private

Method to set the filename of the mapfile generated

Definition at line 208 of file otbMapFileProductWriter.h.

◆ m_VectorWriter

template<class TInputImage >
VectorWriterType::Pointer otb::MapFileProductWriter< TInputImage >::m_VectorWriter
private

Method to set the filename of the mapfile generated

Definition at line 202 of file otbMapFileProductWriter.h.


The documentation for this class was generated from the following files: