RAVE
area.c File Reference

Defines an area, the extent, projection, etc. More...

#include "area.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include <string.h>

Classes

struct  _Area_t
 Represents the area. More...
 

Functions

int Area_setID (Area_t *area, const char *id)
 Sets the ID for this area.
 
const char * Area_getID (Area_t *area)
 Returns the ID for this area.
 
int Area_setDescription (Area_t *area, const char *description)
 Sets the description for this area.
 
const char * Area_getDescription (Area_t *area)
 Returns the description for this area.
 
void Area_setXSize (Area_t *area, long xsize)
 Sets the xsize.
 
long Area_getXSize (Area_t *area)
 Returns the xsize.
 
void Area_setYSize (Area_t *area, long ysize)
 Sets the ysize.
 
long Area_getYSize (Area_t *area)
 Returns the ysize.
 
void Area_setXScale (Area_t *area, double xscale)
 Sets the xscale.
 
double Area_getXScale (Area_t *area)
 Returns the xscale.
 
void Area_setYScale (Area_t *area, double yscale)
 Sets the yscale.
 
double Area_getYScale (Area_t *area)
 Returns the yscale.
 
void Area_setExtent (Area_t *area, double llX, double llY, double urX, double urY)
 Sets the area extent (lower-left, upper-right)
 
void Area_getExtent (Area_t *area, double *llX, double *llY, double *urX, double *urY)
 Returns the area extent (lower-left, upper-right)
 
void Area_setProjection (Area_t *area, Projection_t *projection)
 Sets the projection that defines this area.
 
Projection_tArea_getProjection (Area_t *area)
 Returns the projection that defines this area.
 
int Area_setPcsid (Area_t *area, const char *pcsid)
 The pcsid (projection id) for this area.
 
const char * Area_getPcsid (Area_t *area)
 Returns the projection id for this area.
 

Variables

RaveCoreObjectType Area_TYPE
 Type definition to use when creating a rave object.
 

Detailed Description

Defines an area, the extent, projection, etc.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2009-12-10

Function Documentation

◆ Area_getDescription()

const char * Area_getDescription ( Area_t * area)

Returns the description for this area.

Parameters
[in]area- self
Returns
the description

◆ Area_getExtent()

void Area_getExtent ( Area_t * area,
double * llX,
double * llY,
double * urX,
double * urY )

Returns the area extent (lower-left, upper-right)

Parameters
[in]area- self
[out]llX- lower left X position (may be NULL)
[out]llY- lower left Y position (may be NULL)
[out]urX- upper right X position (may be NULL)
[out]urY- upper right Y position (may be NULL)

◆ Area_getID()

const char * Area_getID ( Area_t * area)

Returns the ID for this area.

Parameters
[in]area- self
Returns
the id

◆ Area_getPcsid()

const char * Area_getPcsid ( Area_t * area)

Returns the projection id for this area.

Parameters
[in]area- self
Returns
the projection id

◆ Area_getProjection()

Projection_t * Area_getProjection ( Area_t * area)

Returns the projection that defines this area.

Parameters
[in]area- self
Returns
the projection

◆ Area_getXScale()

double Area_getXScale ( Area_t * area)

Returns the xscale.

Parameters
[in]area- the area
Returns
the xscale

◆ Area_getXSize()

long Area_getXSize ( Area_t * area)

Returns the xsize.

Parameters
[in]area- self
Returns
the xsize

◆ Area_getYScale()

double Area_getYScale ( Area_t * area)

Returns the yscale.

Parameters
[in]area- the area
Returns
the yscale

◆ Area_getYSize()

long Area_getYSize ( Area_t * area)

Returns the ysize.

Parameters
[in]area- the area
Returns
the ysize

◆ Area_setDescription()

int Area_setDescription ( Area_t * area,
const char * description )

Sets the description for this area.

Parameters
[in]area- self
[in]description- the description
Returns
1 on success otherwise 0

◆ Area_setExtent()

void Area_setExtent ( Area_t * area,
double llX,
double llY,
double urX,
double urY )

Sets the area extent (lower-left, upper-right)

Parameters
[in]area- self
[in]llX- lower left X position
[in]llY- lower left Y position
[in]urX- upper right X position
[in]urY- upper right Y position

◆ Area_setID()

int Area_setID ( Area_t * area,
const char * id )

Sets the ID for this area.

Parameters
[in]area- self
[in]id- the id
Returns
1 on success otherwise 0

◆ Area_setPcsid()

int Area_setPcsid ( Area_t * area,
const char * pcsid )

The pcsid (projection id) for this area.

When setting this id, the projection (if any) will be released unless the pcsid == Projection_getID.

Parameters
[in]area- self
[in]pcsid- the projection id
Returns
1 on success

◆ Area_setProjection()

void Area_setProjection ( Area_t * area,
Projection_t * projection )

Sets the projection that defines this area.

Parameters
[in]area- self
[in]projection- the projection

◆ Area_setXScale()

void Area_setXScale ( Area_t * area,
double xscale )

Sets the xscale.

Parameters
[in]area- the area
[in]xscale- the xscale

◆ Area_setXSize()

void Area_setXSize ( Area_t * area,
long xsize )

Sets the xsize.

Parameters
[in]area- the area
[in]xsize- the xsize

◆ Area_setYScale()

void Area_setYScale ( Area_t * area,
double yscale )

Sets the yscale.

Parameters
[in]area- the area
[in]yscale- the yscale

◆ Area_setYSize()

void Area_setYSize ( Area_t * area,
long ysize )

Sets the ysize.

Parameters
[in]area- the area
[in]ysize- the ysize

Variable Documentation

◆ Area_TYPE

RaveCoreObjectType Area_TYPE
Initial value:
= {
"Area",
sizeof(Area_t),
Area_constructor,
Area_destructor,
Area_copyconstructor
}
struct _Area_t Area_t
Defines a Geographical Area.
Definition area.h:35

Type definition to use when creating a rave object.