[Thuban-commits] r2676 - in trunk/thuban: . libraries/thuban
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Mar 31 19:18:51 CEST 2006
Author: bernhard
Date: 2006-03-31 19:18:50 +0200 (Fri, 31 Mar 2006)
New Revision: 2676
Modified:
trunk/thuban/ChangeLog
trunk/thuban/libraries/thuban/wxproj.cpp
Log:
including proj_api.h instead of projects.h now.
According the Frank Warmerdam and man pj_init
this is the public interface to proj. Thus I have changed PJ to projPJ.
And I could remove the hack to avoid clashes with typedef PVALUE
and #define LP in projects.h clashing with symbols when trying to
build on windows. The file is cleaner and nicer now.
Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog 2006-03-29 10:58:44 UTC (rev 2675)
+++ trunk/thuban/ChangeLog 2006-03-31 17:18:50 UTC (rev 2676)
@@ -1,3 +1,12 @@
+2006-03-31 Bernhard Reiter <bernhard at intevation.de>
+
+ * libraries/thuban/wxproj.cpp: including proj_api.h instead of
+ projects.h now. According the Frank Warmerdam and man pj_init
+ this is the public interface to proj. Thus I have changed PJ to projPJ.
+ And I could remove the hack to avoid clashes with typedef PVALUE
+ and #define LP in projects.h clashing with symbols when trying to
+ build on windows. The file is cleaner and nicer now.
+
2006-03-29 Bernhard Reiter <bernhard at intevation.de>
* libraries/thuban/wxproj.cpp: undef LP to avoid clash when
trying to build with mingw.
Modified: trunk/thuban/libraries/thuban/wxproj.cpp
===================================================================
--- trunk/thuban/libraries/thuban/wxproj.cpp 2006-03-29 10:58:44 UTC (rev 2675)
+++ trunk/thuban/libraries/thuban/wxproj.cpp 2006-03-31 17:18:50 UTC (rev 2676)
@@ -18,21 +18,8 @@
#include <shapefil.h>
#include "pyshapelib_api.h"
-/* PVALUE is a typef in projects.h and is used in winreg.h on Windows as
- * well. We don't need it, so we temporarily rename the one from
- * projects.h */
-#define PVALUE PROJ_PVALUE
+#include <proj_api.h>
-#include <projects.h>
-
-/* undefine it again */
-#undef PVALUE
-
-/* projects.h has a #define for LP.
- * LP is also used in a typedef in winnt.h by mingw/w32api-3.6
- * so we undefine it here to avoid the clash. */
-#undef LP
-
#include <wx/wx.h>
@@ -107,7 +94,7 @@
if (!cobject)
return 0;
- /* now cobject should be a CObject containing the PJ* pointer */
+ /* now cobject should be a CObject containing the projPJ* pointer */
if (PyCObject_Check(cobject))
{
value = PyCObject_AsVoidPtr(cobject);
@@ -134,7 +121,7 @@
*/
static void
project_point(double * xdest, double *ydest,
- PJ* forward, PJ* inverse,
+ projPJ* forward, projPJ* inverse,
double scalex, double scaley, double offx, double offy,
double x, double y)
{
@@ -193,7 +180,7 @@
static wxPoint *
project_points(int num_vertices, int num_parts,
double * xs, double * ys, int * part_start,
- PJ* forward, PJ* inverse,
+ projPJ* forward, projPJ* inverse,
double scalex, double scaley, double offx, double offy)
{
int i;
@@ -242,8 +229,8 @@
PyObject * py_dc;
double scalex, scaley, offx, offy;
SHPHandle handle;
- PJ * forward;
- PJ * inverse;
+ projPJ * forward;
+ projPJ * inverse;
wxDC * dc;
};
@@ -500,8 +487,8 @@
double scalex, scaley, offx, offy;
int px, py;
SHPHandle handle;
- PJ * forward = NULL;
- PJ * inverse = NULL;
+ projPJ * forward = NULL;
+ projPJ * inverse = NULL;
SHPObject * shape;
wxPoint* points;
int num_points;
@@ -608,8 +595,8 @@
PyObject * inverse_cobject;
double scalex, scaley, offx, offy;
SHPHandle handle;
- PJ * forward = NULL;
- PJ * inverse = NULL;
+ projPJ * forward = NULL;
+ projPJ * inverse = NULL;
SHPObject * shape;
double centroidx = 0, centroidy = 0;
double sum = 0, area;
More information about the Thuban-commits
mailing list