CartoType API
Public Member Functions | Protected Member Functions
CartoType::CMapDataBase Class Reference

#include <cartotype_map_data.h>

Inheritance diagram for CartoType::CMapDataBase:
CartoType::CCloudMadeMapDataBase CartoType::CMemoryMapDataBase CartoType::COsmDataBase CartoType::CShpMapDataBase CartoType::CSimpleMapDataBase CartoType::CType1MapDataBase

List of all members.

Public Member Functions

virtual CMapDataContextNewContext (TResult &aError)=0
void SetFileInputStream (CFileInputStream *aFileInputStream)
const CFileInputStreamFileInputStream () const
const TMapGridGrid () const
const TRectExtent () const
const TRectInitialView () const
int32 Layers () const
const MStringDataSetName () const
const MStringCopyright () const
const TDataVersionDataVersion () const
CT_IMPORT int32 LayerIndex (TResult &aError, const MString &aLayerName) const
CMapDataLayerLayer (int32 aIndex)
const TCoordinateTransformProjection () const
CT_IMPORT TResult Find (const TPoint &aPoint, int32 aRadius, CPointerArray< CMapObject > &aObject, int32 aMaxObjects, bool aClearArray)
CT_IMPORT TResult FindInLayer (const MString &aLayer, const TPoint &aPoint, int32 aRadius, CPointerArray< CMapObject > &aObject, int32 aMaxObjects, bool aClearArray)
void SetTile (int32 aZoom, int32 aX, int32 aY)
void GetTile (int32 &aZoom, int32 &aX, int32 &aY)

Protected Member Functions

void SetGrid (const TMapGrid &aGrid)
void SetExtent (const TRect &aExtent)
void SetInitialView (const TRect &aInitialView)
CT_IMPORT TResult AppendLayer (CMapDataLayer *aLayer)
void SetDataVersion (const TDataVersion &aDataVersion)
TResult SetDataSetName (const MString &aDataSetName)
TResult SetCopyright (const MString &aCopyright)
void SetProjection (TCoordinateTransform *aProjection)

Detailed Description

A map database object provides access to the data in a single data set. It can create context objects that act as iterators and filters for the data, and supply information about the data set like its spatial extent and the data layers that are present.


Member Function Documentation

CT_EXPORT TResult CMapDataBase::AppendLayer ( CMapDataLayer aLayer) [protected]

Append a layer to to the database, which takes ownership of it. If the layer cannot be stored it is deleted.

const TRect& CartoType::CMapDataBase::Extent ( ) const [inline]

Return the extent of the whole of the map data, in coordinates defined by Grid().

CT_EXPORT TResult CMapDataBase::Find ( const TPoint aPoint,
int32  aRadius,
CPointerArray< CMapObject > &  aObject,
int32  aMaxObjects,
bool  aClearArray 
)

Find objects within the distance aRadius of aPoint, which is in map coordinates. The objects that are returned are unprojected. The objects are actually within the square centred on aRadius, not the circle, which makes searching easier.

The number of objects returned can be limited by setting aMaxObjects to an appropriate value.

If aClearArray is true the destination array is cleared before the objects are appended.

CT_EXPORT TResult CMapDataBase::FindInLayer ( const MString aLayer,
const TPoint aPoint,
int32  aRadius,
CPointerArray< CMapObject > &  aObject,
int32  aMaxObjects,
bool  aClearArray 
)

Find objects in a named layer, within the distance aRadius of aPoint, which is in map coordinates. The objects that are returned are unprojected. The objects are actually within the square centred on aRadius, not the circle, which makes searching easier.

The number of objects in aObject can be limited by setting aMaxObjects to an appropriate value.

If aClearArray is true the destination array is cleared before the objects are appended.

void CartoType::CMapDataBase::GetTile ( int32 &  aZoom,
int32 &  aX,
int32 &  aY 
) [inline]

Get the tile zoom level and coordinates used as a hint to tile-based databases.

const TRect& CartoType::CMapDataBase::InitialView ( ) const [inline]

Return the preferred initial displayed area of the map. It is normally the same as the extent of the whole of the data, but may be made smaller to make initial display faster.

CT_EXPORT int32 CMapDataBase::LayerIndex ( TResult aError,
const MString aLayerName 
) const

Search layer by name and return index.

const TCoordinateTransform* CartoType::CMapDataBase::Projection ( ) const [inline]

Return the projection used to convert the original data from latitude and longitude to metres. It is stored in serialized form in the CTM1 data format. If it is not available in the current data, or if the data is in unprojected (latitude and longitude) format, return null.

void CartoType::CMapDataBase::SetTile ( int32  aZoom,
int32  aX,
int32  aY 
) [inline]

Set the tile zoom level and coordinates as a hint to tile-based databases.


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