FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoXmlSpatialContextReader Class Reference

#include <SpatialContextReader.h>

Inherits FdoISpatialContextReader, and FdoXmlSaxHandler.

Inheritance diagram for FdoXmlSpatialContextReader:

[legend]
List of all members.

Detailed Description

FdoXmlSpatialContextReader reads Spatial Contexts from an XML document. Unlike other XML Readers, the reading is done procedurally, rather than through events. FdoXmlSpatialContextReader implements FdoISpatialContextReader to provide the functions for retrieving the spatial contexts that were read.

Definition at line 38 of file SpatialContextReader.h.


Public Member Functions

virtual FDO_API FdoStringGetCoordinateSystem ()
 Gets the name of the coordinate system of the spatial context currently being read. If the result is a null or empty string, the coordinate system is unknown to the spatial context.
virtual FDO_API FdoStringGetCoordinateSystemWkt ()
 Gets the coordinate system in OpenGIS SRS WKT format of the spatial context currently being read. If the result is an empty string, the coordinate system WKT description is not available.
virtual FDO_API FdoStringGetDescription ()
 Gets the description of the spatial context currently being read.
virtual FDO_API FdoByteArrayGetExtent ()
 Gets the extent of the spatial context currently being read as a byte array in FGF format.
virtual FDO_API FdoSpatialContextExtentType GetExtentType ()
 Gets the extent type of the spatial context currently being read.
virtual FDO_API FdoStringGetName ()
 Gets the name of the spatial context currently being read.
FDO_API FdoXmlReaderGetXmlReader ()
 Gets the Xml document reader that was passed to this object.
virtual FDO_API const double GetXYTolerance ()
 Gets the tolerance value for XY ordinates of the spatial context currently being read. Tolerances are used in some geometric tests, mostly for equality between coordinates. This occurs frequently in spatial queries, especially with "on boundary" or "just touching" conditions. It is also an objective amount that can be used when formulating step distances for parametric curve interpolation.
virtual FDO_API const double GetZTolerance ()
 Gets the tolerance value for Z ordinates of the spatial context currently being read. Tolerances are used in some geometric tests, mostly for equality between coordinates. This occurs a frequently in spatial queries, especially with "on boundary" or "just touching" conditions. It is also an objective amount that can be used when formulating step distances for parametric curve interpolation.
virtual FDO_API const bool IsActive ()
 Returns true if the spatial context currently being read is the active spatial context.
virtual FDO_API bool ReadNext ()
 Advances the reader to the next item. The default position of the reader is prior to the first item. Thus, you must call ReadNext to begin accessing any data.
virtual FDO_API FdoBoolean XmlEndElement (FdoXmlSaxContext *saxContext, FdoString *uri, FdoString *name, FdoString *qname)
 Default Sax callback that is called when the FdoXmlReader reads the end tag for an XML element in the document. Does nothing.
virtual FDO_API FdoXmlSaxHandlerXmlStartDocument (FdoXmlSaxContext *saxContext)
 Default Sax callback that is called when the FdoXmlReader starts reading an XML document. Does nothing.
virtual FDO_API FdoXmlSaxHandlerXmlStartElement (FdoXmlSaxContext *saxContext, FdoString *uri, FdoString *name, FdoString *qname, FdoXmlAttributeCollection *atts)

Static Public Member Functions

FDO_API FdoXmlSpatialContextReaderCreate (FdoXmlReader *reader, FdoXmlSpatialContextFlags *flags=NULL)
 creates a Spatial Context Reader.

Protected Member Functions

virtual FDO_API void Dispose ()
FDO_API FdoXmlSpatialContextReader (FdoXmlReader *reader, FdoXmlSpatialContextFlags *flags)
 FdoXmlSpatialContextReader ()
 default constructor to keep linux from complaining.
void ThrowOnNotRead (FdoString *function)
 Throws an exception if a getter is called but there is no currently read Spatial Context.
virtual FDO_API ~FdoXmlSpatialContextReader ()

Constructor & Destructor Documentation

FdoXmlSpatialContextReader::FdoXmlSpatialContextReader  )  [inline, protected]
 

default constructor to keep linux from complaining.

Definition at line 193 of file SpatialContextReader.h.

FDO_API FdoXmlSpatialContextReader::FdoXmlSpatialContextReader FdoXmlReader reader,
FdoXmlSpatialContextFlags flags
[protected]
 

virtual FDO_API FdoXmlSpatialContextReader::~FdoXmlSpatialContextReader  )  [protected, virtual]
 


Member Function Documentation

FDO_API FdoXmlSpatialContextReader* FdoXmlSpatialContextReader::Create FdoXmlReader reader,
FdoXmlSpatialContextFlags flags = NULL
[static]
 

creates a Spatial Context Reader.

Parameters:
reader Input XML document reader. Specifies the XML document that the Spatial Contexts will be read from.
flags Input options for controlling the deserializing of the Spatial Contexts. If NULL then the default flags are used.
Returns:
Returns FdoXmlSpatialContextReader

virtual FDO_API void FdoXmlSpatialContextReader::Dispose  )  [protected, virtual]
 

Closes the FdoXmlSpatialContextReader object, freeing any resources it may be holding.

Implements FdoISpatialContextReader.

virtual FDO_API FdoString* FdoXmlSpatialContextReader::GetCoordinateSystem  )  [virtual]
 

Gets the name of the coordinate system of the spatial context currently being read. If the result is a null or empty string, the coordinate system is unknown to the spatial context.

Returns:
Returns the coordinate system name of the spatial context.

Implements FdoISpatialContextReader.

virtual FDO_API FdoString* FdoXmlSpatialContextReader::GetCoordinateSystemWkt  )  [virtual]
 

Gets the coordinate system in OpenGIS SRS WKT format of the spatial context currently being read. If the result is an empty string, the coordinate system WKT description is not available.

Returns:
Returns the coordinate system description in WKT of of the spatial context.

Implements FdoISpatialContextReader.

virtual FDO_API FdoString* FdoXmlSpatialContextReader::GetDescription  )  [virtual]
 

Gets the description of the spatial context currently being read.

Returns:
Returns the description of the spatial context.

Implements FdoISpatialContextReader.

virtual FDO_API FdoByteArray* FdoXmlSpatialContextReader::GetExtent  )  [virtual]
 

Gets the extent of the spatial context currently being read as a byte array in FGF format.

Returns:
Returns the extent as a byte array in FGF format.

Implements FdoISpatialContextReader.

virtual FDO_API FdoSpatialContextExtentType FdoXmlSpatialContextReader::GetExtentType  )  [virtual]
 

Gets the extent type of the spatial context currently being read.

Returns:
Returns the extent type.

Implements FdoISpatialContextReader.

virtual FDO_API FdoString* FdoXmlSpatialContextReader::GetName  )  [virtual]
 

Gets the name of the spatial context currently being read.

Returns:
Returns the name of the spatial context.

Implements FdoISpatialContextReader.

FDO_API FdoXmlReader* FdoXmlSpatialContextReader::GetXmlReader  ) 
 

Gets the Xml document reader that was passed to this object.

Returns:
Returns the XML document reader.

virtual FDO_API const double FdoXmlSpatialContextReader::GetXYTolerance  )  [virtual]
 

Gets the tolerance value for XY ordinates of the spatial context currently being read. Tolerances are used in some geometric tests, mostly for equality between coordinates. This occurs frequently in spatial queries, especially with "on boundary" or "just touching" conditions. It is also an objective amount that can be used when formulating step distances for parametric curve interpolation.

Returns:
Returns the tolerance

Implements FdoISpatialContextReader.

virtual FDO_API const double FdoXmlSpatialContextReader::GetZTolerance  )  [virtual]
 

Gets the tolerance value for Z ordinates of the spatial context currently being read. Tolerances are used in some geometric tests, mostly for equality between coordinates. This occurs a frequently in spatial queries, especially with "on boundary" or "just touching" conditions. It is also an objective amount that can be used when formulating step distances for parametric curve interpolation.

Returns:
Returns the tolerance

Implements FdoISpatialContextReader.

virtual FDO_API const bool FdoXmlSpatialContextReader::IsActive  )  [virtual]
 

Returns true if the spatial context currently being read is the active spatial context.

Returns:
Returns true if the current spatial context is the active one.

Implements FdoISpatialContextReader.

virtual FDO_API bool FdoXmlSpatialContextReader::ReadNext  )  [virtual]
 

Advances the reader to the next item. The default position of the reader is prior to the first item. Thus, you must call ReadNext to begin accessing any data.

Returns:
Returns true if there is a next item.

Implements FdoISpatialContextReader.

void FdoXmlSpatialContextReader::ThrowOnNotRead FdoString function  )  [protected]
 

Throws an exception if a getter is called but there is no currently read Spatial Context.

virtual FDO_API FdoBoolean FdoXmlSpatialContextReader::XmlEndElement FdoXmlSaxContext saxContext,
FdoString uri,
FdoString name,
FdoString qname
[virtual]
 

Default Sax callback that is called when the FdoXmlReader reads the end tag for an XML element in the document. Does nothing.

Parameters:
saxContext Input caller specified contextual information
uri Input the element's Universal Resource Indicator
name Input the unqualified element name (doesn't include namespace)
qname Input the qualified element name (includes namespace)
Returns:
Returning true causes the current parse to stop. Returning false cause the parse to continue. Return value is ignored if the current parse is not an incremental parse ( see FdoXmlReader::Parse())

Reimplemented from FdoXmlSaxHandler.

virtual FDO_API FdoXmlSaxHandler* FdoXmlSpatialContextReader::XmlStartDocument FdoXmlSaxContext saxContext  )  [virtual]
 

Default Sax callback that is called when the FdoXmlReader starts reading an XML document. Does nothing.

Parameters:
saxContext Input caller specified contextual information
Returns:
Returns the SAX Handler for the document's root element. If NULL then this SAX handler will handle the root element

Reimplemented from FdoXmlSaxHandler.

virtual FDO_API FdoXmlSaxHandler* FdoXmlSpatialContextReader::XmlStartElement FdoXmlSaxContext saxContext,
FdoString uri,
FdoString name,
FdoString qname,
FdoXmlAttributeCollection atts
[virtual]
 

The following callbacks catch the start element and end element SAX events.

Reimplemented from FdoXmlSaxHandler.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.