RAVE
pyprojection.c File Reference

Python version of the projection API. More...

#include "pyravecompat.h"
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "pyprojection.h"
#include "pyrave_debug.h"
#include "rave_alloc.h"

Macros

#define PYPROJECTION_MODULE
 to get correct part of pyprojection.h
 
#define raiseException_gotoTag(tag, type, msg)
 Sets a python exception and goto tag.
 
#define raiseException_returnNULL(type, msg)
 Sets a python exception and returns NULL.
 

Functions

 PYRAVE_DEBUG_MODULE ("_projection")
 Debug this module.
 
 MOD_DIR_FORWARD_DECLARE (PyProjection)
 
 PyDoc_STRVAR (_pyprojection_type_doc, "Wrapper around the USGS PROJ.4 library\n" "There are 3 readonly attributes that are set when creating the actual instance:\n" "id - identifier of this projection, like ps14e60n\n" "description - description of this projection\n" "definition - the USGS PROJ.4 definition string" "\n" "Usage:\n" " import _projection\n" " proj = _projection.new(\"merc_proj\", \"mercator projection\", \"+proj=merc +lat_ts=0 +lon_0=0 +k=1.0 +R=6378137.0 +nadgrids=@null +no_defs\")\n" " xy = proj.fwd(deg2rad((12.8544, 56.3675)))\n")
 
 MOD_INIT (_projection)
 

Variables

PyTypeObject PyProjection_Type
 

Detailed Description

Python version of the projection API.

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

Macro Definition Documentation

◆ PYPROJECTION_MODULE

#define PYPROJECTION_MODULE

to get correct part of pyprojection.h

◆ raiseException_gotoTag

#define raiseException_gotoTag ( tag,
type,
msg )
Value:
{PyErr_SetString(type, msg); goto tag;}

Sets a python exception and goto tag.

◆ raiseException_returnNULL

#define raiseException_returnNULL ( type,
msg )
Value:
{PyErr_SetString(type, msg); return NULL;}

Sets a python exception and returns NULL.

Function Documentation

◆ PYRAVE_DEBUG_MODULE()

PYRAVE_DEBUG_MODULE ( "_projection" )

Debug this module.