|
|
|
#include "modgmt.h"
|
|
|
|
#include "modgmt_func.h"
|
|
|
|
#include "modgmt_internals.h"
|
|
|
|
|
|
|
|
// Initialisation function
|
|
|
|
int gmt_module_init(void* p)
|
|
|
|
{
|
|
|
|
// Fill header and footer
|
|
|
|
void* gmtapi;
|
|
|
|
int ret=0;
|
|
|
|
|
|
|
|
gmtapi=GMT_Create_Session("gmt_makemap",2,GMTMODE,0);
|
|
|
|
if(0==gmtapi) return 1;
|
|
|
|
if(0==ret) ret=callgmtmodule(gmtapi,"psclip","-C -P -K",&header,gmt_filter_headfoot);
|
|
|
|
if(0==ret) ret=callgmtmodule(gmtapi,"psclip","-C -P -O",&footer,gmt_filter_headfoot);
|
|
|
|
GMT_Destroy_Session(gmtapi);
|
|
|
|
if(0!=ret) return ret;
|
|
|
|
|
|
|
|
gmt_projection::FillProjNames();
|
|
|
|
|
|
|
|
RegisterFunction("GMT_Header",GMT_Header);
|
|
|
|
RegisterFunction("GMT_Footer",GMT_Footer);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTCoord>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTRegion>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTProjection>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTColor>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTDash>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTPen>);
|
|
|
|
RegisterFunction("GET",Get<ObjectGMTLayer>);
|
|
|
|
|
|
|
|
RegisterFunction("Coord",GMT_Coord);
|
|
|
|
RegisterFunction("Region",GMT_Region);
|
|
|
|
RegisterFunction("Projection",GMT_Projection);
|
|
|
|
return 0;
|
|
|
|
}
|