www.pudn.com > dstile-0.2.rar > Warper.h


class Warper {
public:
    Warper() : 
	m_needDestroy(false),
	m_opts(0),
	m_oper(0)
    {
    }

    ~Warper() {
	if (m_needDestroy) Destroy();
    }

public:
    void Create(GDALDataset *src, GDALDataset *dst, const CSTrans& cst);
    void Destroy();

public:
    void ChunkAndWarpImage(int x, int y, int sx, int sy) { 
	if (m_oper->ChunkAndWarpImage(x, y, sx, sy) != CE_None) throw Exception("ChunkAndWarpImage failed.");
    }

public:
    bool m_needDestroy;
    GDALWarpOptions *m_opts;
    GDALWarpOperation *m_oper;
};