RAVE
pyarearegistry.c File Reference

Python version of the Area registry. More...

#include "pyravecompat.h"
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "pyrave_debug.h"
#include "pyprojectionregistry.h"
#include "pyarea.h"
#include "pyarearegistry.h"
#include "rave_alloc.h"

Macros

#define PYAREAREGISTRY_MODULE
 to get correct part in pyarearegistry.h
 
#define raiseException_gotoTag(tag, type, msg)
 Sets a python exception and goto tag.
 
#define raiseException_returnNULL(type, msg)
 Sets a python exception and return NULL.
 

Functions

 PYRAVE_DEBUG_MODULE ("_arearegistry")
 Debug this module.
 
 PyDoc_STRVAR (_pyarearegistry_type_doc, "The area registry provides the user with area definitions that are usable when for example creating cartesian products.\n" "\n" "After the registry has been created, you are able to add, remove and get area definitions as well as writing to the registry file.\n" "You are also able to change the projection registry to use by changing the member variable:\n" " * pregistry - The projection registry of type ProjectionRegistryCore\n\n" "A simple example on how this area registry can be used is:\n" " import _arearegistry, _projectionregistry\n" " reg = _arearegistry.load(\"area_regitry.xml\", _projectionregistry.load(\"projection_registry.xml\"))\n" " area = reg.getByName(\"swegmaps_2000\")")
 
 PyDoc_STRVAR (_pyarearegistry_module_doc, "This class provides functionality for managing an area registry. It can also read and write the registry.\n" "\n" "See the load function for information about format of the xml file.\n" "\n" "Usage:\n" " import _arearegistry\n" " reg = _arearegistry.load(\"/tmp/area_registry.xml\", proj_registry)\n" " area = reg.getByName(\"swegmaps_2000\")\n")
 
 MOD_INIT (_arearegistry)
 

Variables

PyTypeObject PyAreaRegistry_Type
 

Detailed Description

Python version of the Area registry.

Author
Anders Henja (Swedish Meteorological and Hydrological Institute, SMHI)
Date
2010-12-15

Macro Definition Documentation

◆ PYAREAREGISTRY_MODULE

#define PYAREAREGISTRY_MODULE

to get correct part in pyarearegistry.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 return NULL.

Function Documentation

◆ PYRAVE_DEBUG_MODULE()

PYRAVE_DEBUG_MODULE ( "_arearegistry" )

Debug this module.