RAVE
projection_pipeline.h File Reference

Helper class to support both legacy PROJ.4 projection and > PROJ.4 This object supports RAVE_OBJECT_CLONE. More...

#include "rave_object.h"
#include "projection.h"

Go to the source code of this file.

Typedefs

typedef struct _ProjectionPipeline_t ProjectionPipeline_t
 Defines a projection pipeline.
 

Functions

ProjectionPipeline_tProjectionPipeline_createPipeline (Projection_t *first, Projection_t *second)
 Creates a pipeline from one projection to another.
 
ProjectionPipeline_tProjectionPipeline_createPipelineFromDef (const char *first, const char *second)
 Creates a pipeline from one projection to another.
 
ProjectionPipeline_tProjectionPipeline_createDefaultLonLatPipeline (Projection_t *other)
 Creates a default pipeline used for translating between lon/lat and the other projection.
 
ProjectionPipeline_tProjectionPipeline_createDefaultLonLatPipelineFromDef (const char *other)
 Creates a default pipeline used for translating between lon/lat and the other projection where other is defined as a string.
 
int ProjectionPipeline_init (ProjectionPipeline_t *pipeline, Projection_t *first, Projection_t *second)
 Initializes a pipeline with the projections.
 
int ProjectionPipeline_initFromDef (ProjectionPipeline_t *pipeline, const char *first, const char *second)
 Initializes a pipeline with the projection definitions.
 
Projection_tProjectionPipeline_getFirstProjection (ProjectionPipeline_t *pipeline)
 Returns the first projection.
 
Projection_tProjectionPipeline_getSecondProjection (ProjectionPipeline_t *pipeline)
 Returns the second projection.
 
int ProjectionPipeline_fwd (ProjectionPipeline_t *pipeline, double inu, double inv, double *outu, double *outv)
 Transforms the coordinates from first projection to second projection using this pipeline.
 
int ProjectionPipeline_inv (ProjectionPipeline_t *pipeline, double inu, double inv, double *outu, double *outv)
 Transforms the coordinates from second projection to first projection using this pipeline.
 

Variables

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

Detailed Description

Helper class to support both legacy PROJ.4 projection and > PROJ.4 This object supports RAVE_OBJECT_CLONE.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2021-10-14

Typedef Documentation

◆ ProjectionPipeline_t

Defines a projection pipeline.

Function Documentation

◆ ProjectionPipeline_createDefaultLonLatPipeline()

ProjectionPipeline_t * ProjectionPipeline_createDefaultLonLatPipeline ( Projection_t * other)

Creates a default pipeline used for translating between lon/lat and the other projection.

More or less same as writing: ProjectionPipeline_createPipeline(Projection_createDefaultLonLatProjection(), other)

Parameters
[in]other- the other projection
Returns
the pipeline on success otherwise NULL

◆ ProjectionPipeline_createDefaultLonLatPipelineFromDef()

ProjectionPipeline_t * ProjectionPipeline_createDefaultLonLatPipelineFromDef ( const char * other)

Creates a default pipeline used for translating between lon/lat and the other projection where other is defined as a string.

More or less same as writing: ProjectionPipeline_createPipelineFromDef(Projection_getDefaultLonLatProjDef(), other)

Parameters
[in]other- the other proj definition
Returns
the pipeline on success otherwise NULL

◆ ProjectionPipeline_createPipeline()

ProjectionPipeline_t * ProjectionPipeline_createPipeline ( Projection_t * first,
Projection_t * second )

Creates a pipeline from one projection to another.

Parameters
[in]first- first projection
[in]second- second projection
Returns
the pipeline on success otherwise NULL

◆ ProjectionPipeline_createPipelineFromDef()

ProjectionPipeline_t * ProjectionPipeline_createPipelineFromDef ( const char * first,
const char * second )

Creates a pipeline from one projection to another.

Parameters
[in]first- first projection definition
[in]second- second projection definition
Returns
the pipeline on success otherwise NULL

◆ ProjectionPipeline_fwd()

int ProjectionPipeline_fwd ( ProjectionPipeline_t * pipeline,
double inu,
double inv,
double * outu,
double * outv )

Transforms the coordinates from first projection to second projection using this pipeline.

Parameters
[in]pipeline- this pipeline
[in]inu- coordinate
[in]inv- coordinate
[out]outu- coordinate
[out]outv- coordinate
Returns
0 on failure, otherwise success

◆ ProjectionPipeline_getFirstProjection()

Projection_t * ProjectionPipeline_getFirstProjection ( ProjectionPipeline_t * pipeline)

Returns the first projection.

Parameters
[in]pipeline- self
Returns
the first pipeline

◆ ProjectionPipeline_getSecondProjection()

Projection_t * ProjectionPipeline_getSecondProjection ( ProjectionPipeline_t * pipeline)

Returns the second projection.

Parameters
[in]pipeline- self
Returns
the second pipeline

◆ ProjectionPipeline_init()

int ProjectionPipeline_init ( ProjectionPipeline_t * pipeline,
Projection_t * first,
Projection_t * second )

Initializes a pipeline with the projections.

Parameters
[in]first- first projection
[in]second- second projection
Returns
1 on success otherwise NULL

◆ ProjectionPipeline_initFromDef()

int ProjectionPipeline_initFromDef ( ProjectionPipeline_t * pipeline,
const char * first,
const char * second )

Initializes a pipeline with the projection definitions.

Parameters
[in]first- first projection definition
[in]second- second projection definition
Returns
1 on success otherwise NULL

◆ ProjectionPipeline_inv()

int ProjectionPipeline_inv ( ProjectionPipeline_t * pipeline,
double inu,
double inv,
double * outu,
double * outv )

Transforms the coordinates from second projection to first projection using this pipeline.

Parameters
[in]pipeline- this pipeline
[in]inu- coordinate
[in]inv- coordinate
[out]outu- coordinate
[out]outv- coordinate
Returns
0 on failure, otherwise success

Variable Documentation

◆ ProjectionPipeline_TYPE

RaveCoreObjectType ProjectionPipeline_TYPE
extern

Type definition to use when creating a rave object.