Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
otb::MapFileProductWriter< TInputImage > Class Template Reference

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

#include <otbMapFileProductWriter.h>

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

Public Types

typedef itk::SmartPointer
< const Self
ConstPointer
 
typedef
VectorDataType::DataNodeType 
DataNodeType
 
typedef
GenericRSResamplerType::Pointer 
GenericRSResamplerPointerType
 
typedef
GenericRSResampleImageFilter
< InputImageType,
InputImageType
GenericRSResamplerType
 
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
< OutputPixelType
OutputImageType
 
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,
InputImageType
StreamingShrinkImageFilterType
 
typedef itk::ProcessObject Superclass
 
typedef GenericRSTransform TransformType
 
typedef VectorDataFileWriter
< VectorDataType
VectorDataFileWriterType
 
typedef VectorData< double, 2 > VectorDataType
 
typedef MultiChannelExtractROI
< InternalPixelType,
OutputPixelType
VectorImageExtractROIFilterType
 Multi channels Extract ROI filter. More...
 
typedef
VectorRescaleIntensityImageFilter
< InputImageType,
InputImageType
VectorRescaleIntensityImageFilterType
 
typedef ImageFileWriter
< OutputImageType
VectorWriterType
 
typedef PolygonType::VertexType VertexType
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetCGIPath () const
 
virtual const char * GetFileName () const
 
const InputImageTypeGetInput (void)
 
const InputImageTypeGetInput (unsigned int idx)
 
virtual const char * GetNameOfClass () const
 
virtual const char * GetShapeIndexPath () const
 
virtual unsigned int GetTileSize ()
 
virtual void SetCGIPath (const char *_arg)
 
virtual void SetFileName (const char *_arg)
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
virtual void SetShapeIndexPath (const char *_arg)
 
virtual void SetSRID (int _arg)
 
virtual void SetTileSize (unsigned int _arg)
 
virtual void Update ()
 

Static Public Member Functions

static Pointer New ()
 

Static Public Attributes

static const unsigned int InputImageDimension = InputImageType::ImageDimension
 

Protected Member Functions

 MapFileProductWriter ()
 
virtual ~MapFileProductWriter ()
 
void PrintSelf (std::ostream &os, itk::Indent indent) const
 
virtual void Tiling ()
 
virtual void Write ()
 

Private Member Functions

 MapFileProductWriter (const Self &)
 
virtual void AddBBoxToIndexTile (OutputPointType lowerLeftCorner, OutputPointType lowerRightCorner, OutputPointType upperRightCorner, OutputPointType upperLeftCorner, unsigned int x, unsigned int y)
 
void AddLayer ()
 
virtual void GenerateMapFile ()
 
virtual void Initialize ()
 
void InitializeVectorData ()
 
void operator= (const Self &)
 

Private Attributes

std::string m_CGIPath
 
unsigned int m_CurrentDepth
 
std::ofstream m_File
 
std::string m_FileName
 
DataNodeType::Pointer m_Folder
 
GenericRSResamplerPointerType m_GenericRSResampler
 
std::string m_IndexShapeFileName
 
DataNodeType::Pointer m_Polygon
 
InputImagePointer m_ResampleVectorImage
 
std::string m_ShapeIndexPath
 
int m_SRID
 
StreamingShrinkImageFilterType::Pointer m_StreamingShrinkImageFilter
 
unsigned int m_TileSize
 
TransformType::Pointer m_Transform
 
VectorDataType::Pointer m_VectorDataIndexTile
 
InputImagePointer m_VectorImage
 
VectorImageExtractROIFilterType::Pointer m_VectorImageExtractROIFilter
 
VectorRescaleIntensityImageFilterType::Pointer m_VectorRescaleIntensityImageFilter
 
VectorWriterType::Pointer m_VectorWriter
 

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 wich describe the tiles and where to find them on the disk.

This filter begins by tiling the input image. An accessor SetTileSize allows to set 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 wich 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 66 of file otbMapFileProductWriter.h.

Member Typedef Documentation

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

Definition at line 73 of file otbMapFileProductWriter.h.

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

Definition at line 94 of file otbMapFileProductWriter.h.

Definition at line 118 of file otbMapFileProductWriter.h.

Definition at line 117 of file otbMapFileProductWriter.h.

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

Definition at line 85 of file otbMapFileProductWriter.h.

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

Definition at line 88 of file otbMapFileProductWriter.h.

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

Definition at line 86 of file otbMapFileProductWriter.h.

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

Definition at line 87 of file otbMapFileProductWriter.h.

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

Some convenient typedefs.

Definition at line 79 of file otbMapFileProductWriter.h.

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

Definition at line 122 of file otbMapFileProductWriter.h.

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

Definition at line 83 of file otbMapFileProductWriter.h.

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

Definition at line 91 of file otbMapFileProductWriter.h.

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

Definition at line 90 of file otbMapFileProductWriter.h.

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

Definition at line 123 of file otbMapFileProductWriter.h.

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

Definition at line 72 of file otbMapFileProductWriter.h.

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

Definition at line 95 of file otbMapFileProductWriter.h.

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

Standard class typedefs.

Definition at line 70 of file otbMapFileProductWriter.h.

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

Definition at line 84 of file otbMapFileProductWriter.h.

Definition at line 110 of file otbMapFileProductWriter.h.

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

Definition at line 71 of file otbMapFileProductWriter.h.

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

Definition at line 121 of file otbMapFileProductWriter.h.

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

Definition at line 98 of file otbMapFileProductWriter.h.

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

Definition at line 93 of file otbMapFileProductWriter.h.

Multi channels Extract ROI filter.

Definition at line 103 of file otbMapFileProductWriter.h.

Definition at line 114 of file otbMapFileProductWriter.h.

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

Definition at line 106 of file otbMapFileProductWriter.h.

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

Definition at line 96 of file otbMapFileProductWriter.h.

Constructor & Destructor Documentation

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

Constructor

Definition at line 32 of file otbMapFileProductWriter.txx.

template<class TInputImage >
otb::MapFileProductWriter< TInputImage >::~MapFileProductWriter ( )
protectedvirtual

Desctructor

Definition at line 46 of file otbMapFileProductWriter.txx.

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

Member Function Documentation

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 435 of file otbMapFileProductWriter.txx.

References otb::FEATURE_POLYGON.

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

Add a layer to the mapfile

Definition at line 562 of file otbMapFileProductWriter.txx.

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

Method To Generate the mapFile

Write the mapFile on the disk

Definition at line 487 of file otbMapFileProductWriter.txx.

template<class TInputImage>
virtual const char* otb::MapFileProductWriter< TInputImage >::GetCGIPath ( ) const
virtual
template<class TInputImage>
virtual const char* otb::MapFileProductWriter< TInputImage >::GetFileName ( ) const
virtual
template<class TInputImage >
const MapFileProductWriter< TInputImage >::InputImageType * otb::MapFileProductWriter< TInputImage >::GetInput ( void  )

Definition at line 80 of file otbMapFileProductWriter.txx.

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

Get the idx input

Definition at line 97 of file otbMapFileProductWriter.txx.

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

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

template<class TInputImage>
virtual const char* otb::MapFileProductWriter< TInputImage >::GetShapeIndexPath ( ) const
virtual
template<class TInputImage>
virtual unsigned int otb::MapFileProductWriter< TInputImage >::GetTileSize ( )
virtual
template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::Initialize ( void  )
privatevirtual

Mehtod 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 144 of file otbMapFileProductWriter.txx.

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

Intialize vd

Initialize the vectordata to write

Definition at line 164 of file otbMapFileProductWriter.txx.

References otb::DOCUMENT, otb::FOLDER, and otb::GeoInformationConversion::ToWKT().

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

Method for creation through the object factory.

template<class TInputImage>
void otb::MapFileProductWriter< TInputImage >::operator= ( const Self )
private
template<class TInputImage >
void otb::MapFileProductWriter< TInputImage >::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
protected

Definition at line 589 of file otbMapFileProductWriter.txx.

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

Set CGI filename path

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

Method to set the filename of the mapfile generated

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

Definition at line 56 of file otbMapFileProductWriter.txx.

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

Definition at line 67 of file otbMapFileProductWriter.txx.

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

Set SahpePATH: the directory where to store the shapefile

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

Macro to set the SRID we want to project Data in

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

Set/Get the size of each tile

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 189 of file otbMapFileProductWriter.txx.

References otb::GeoInformationConversion::ToWKT().

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

Update Method : Call a porotected Write method

Definition at line 151 of file otbMapFileProductWriter.h.

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

Method for writing

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

Definition at line 111 of file otbMapFileProductWriter.txx.

References otbMsgDevMacro, and otb::GeoInformationConversion::ToWKT().

Member Data Documentation

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.

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

Definition at line 226 of file otbMapFileProductWriter.h.

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

Definition at line 221 of file otbMapFileProductWriter.h.

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

Definition at line 229 of file otbMapFileProductWriter.h.

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

Definition at line 224 of file otbMapFileProductWriter.h.

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

Definition at line 214 of file otbMapFileProductWriter.h.

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

Definition at line 217 of file otbMapFileProductWriter.h.

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

Definition at line 225 of file otbMapFileProductWriter.h.

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

Definition at line 213 of file otbMapFileProductWriter.h.

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

Definition at line 194 of file otbMapFileProductWriter.h.

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

Definition at line 227 of file otbMapFileProductWriter.h.

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

Definition at line 230 of file otbMapFileProductWriter.h.

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

Definition at line 203 of file otbMapFileProductWriter.h.

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

Definition at line 220 of file otbMapFileProductWriter.h.

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

Definition at line 209 of file otbMapFileProductWriter.h.

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

Definition at line 212 of file otbMapFileProductWriter.h.

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

Definition at line 193 of file otbMapFileProductWriter.h.

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

Definition at line 197 of file otbMapFileProductWriter.h.

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

Definition at line 206 of file otbMapFileProductWriter.h.

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

Definition at line 200 of file otbMapFileProductWriter.h.


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