2004-04-05 20:53:17 +00:00
|
|
|
#ifndef _GRATICULECREATOR_H_
|
|
|
|
#define _GRATICULECREATOR_H_
|
|
|
|
|
|
|
|
#include "shapefile.h"
|
|
|
|
#include "utils.h"
|
|
|
|
|
|
|
|
//qt includes
|
|
|
|
#include <qstring.h>
|
|
|
|
#include <qfile.h>
|
|
|
|
|
|
|
|
class GraticuleCreator
|
|
|
|
{
|
|
|
|
public:
|
2004-11-09 01:04:00 +00:00
|
|
|
GraticuleCreator(QString theOutputFileName,
|
|
|
|
double theXIntervalDouble,
|
|
|
|
double theYIntervalDouble,
|
|
|
|
double theXOriginDouble,
|
|
|
|
double theYOriginDouble,
|
|
|
|
double theXEndPointDouble,
|
|
|
|
double theYEndPointDouble);
|
2004-04-05 20:53:17 +00:00
|
|
|
~GraticuleCreator() {};
|
|
|
|
DBFHandle GraticuleCreator::createDbf (QString theDbfName ) ;
|
|
|
|
SHPHandle GraticuleCreator::createShapeFile(QString theFileName );
|
|
|
|
void writeDbfRecord (DBFHandle theDbfHandle, int theRecordIdInt, QString theLabel) ;
|
2004-04-06 07:17:03 +00:00
|
|
|
void writePoint(SHPHandle theShapeHandle, int theRecordInt, double theXDouble, double y );
|
2005-07-03 00:18:14 +00:00
|
|
|
//! Writes a WGS 84 .prj file for the generated grid
|
|
|
|
void writeProjectionFile(QString theFileName);
|
2004-04-06 07:17:03 +00:00
|
|
|
static void writeLine(SHPHandle theShapeHandle,
|
2004-04-05 20:53:17 +00:00
|
|
|
int theRecordInt,
|
|
|
|
int theCoordinateCountInt,
|
|
|
|
double * theXArrayDouble,
|
|
|
|
double * theYArrayDouble );
|
2004-11-09 01:04:00 +00:00
|
|
|
void generateGraticule(DBFHandle theDbfHandle,
|
|
|
|
SHPHandle theShapeHandle,
|
|
|
|
double theXIntervalDouble,
|
|
|
|
double theYIntervalDouble,
|
|
|
|
double theXOriginDouble,
|
|
|
|
double theYOriginDouble,
|
|
|
|
double theXEndPointDouble,
|
|
|
|
double theYEndPointDouble);
|
2004-04-06 07:17:03 +00:00
|
|
|
void generatePoints (QString theInputFileName, DBFHandle theDbfHandle, SHPHandle theShapeHandle);
|
2004-04-05 20:53:17 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
#endif
|