#include "lwgeom_geos.h"
#include "liblwgeom_internal.h"
#include "lwgeom_rtree.h"
-#include "lwgeom_geos_prepared.h" /* for PREPARED_GEOM define */
#include "lwgeom_functions_analytic.h" /* for point_in_polygon */
#include "funcapi.h"
+/*
+** GEOS prepared geometry is only available from GEOS 3.1 onwards
+*/
+#define PREPARED_GEOM
+
+#ifdef PREPARED_GEOM
+#include "lwgeom_geos_prepared.h"
+#endif
+
#include <string.h>
#include <assert.h>
*
**********************************************************************/
+#ifndef LWGEOM_GEOS_H_
+#define LWGEOM_GEOS_H_ 1
+
#include "postgres.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "../postgis_config.h"
-/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain
- header guards to protect from multiple inclusion */
-#ifndef GEOS_C_INCLUDED
-#define GEOS_C_INCLUDED
-#include "geos_c.h"
-#endif
-
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "profile.h"
void errorIfGeometryCollection(PG_LWGEOM *g1, PG_LWGEOM *g2);
+#endif /* LWGEOM_GEOS_H_ 1 */
*
**********************************************************************/
+#ifndef LWGEOM_GEOS_PREPARED_H_
+#define LWGEOM_GEOS_PREPARED_H_ 1
+
#include "postgres.h"
#include "fmgr.h"
#include "miscadmin.h"
#include "../postgis_config.h"
-/* Workaround for GEOS 2.2 compatibility: old geos_c.h does not contain
- header guards to protect from multiple inclusion */
-#ifndef GEOS_C_INCLUDED
-#define GEOS_C_INCLUDED
-#include "geos_c.h"
-#endif
-
#include "lwgeom_pg.h"
#include "liblwgeom.h"
#include "lwgeom_geos.h"
-/*
-** GEOS prepared geometry is only available from GEOS 3.1 onwards
-*/
-#define PREPARED_GEOM
-
/*
** Cache structure. We use PG_LWGEOM as keys so no transformations
** are needed before we memcmp them with other keys. We store the
** Both the Geometry and the PreparedGeometry have to be cached,
** because the PreparedGeometry contains a reference to the geometry.
*/
-#ifdef PREPARED_GEOM
typedef struct
{
char type;
*/
PrepGeomCache *GetPrepGeomCache(FunctionCallInfoData *fcinfo, PG_LWGEOM *pg_geom1, PG_LWGEOM *pg_geom2);
-
-#endif /* PREPARED_GEOM */
-
+#endif /* LWGEOM_GEOS_PREPARED_H_ 1 */
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.refractions.net
+ *
+ * Copyright (C) 2004 Sandro Santilli <strk@keybit.net>
+ *
+ * This is free software; you can redistribute and/or modify it under
+ * the terms of the GNU General Public Licence. See the COPYING file.
+ *
+ **********************************************************************/
+
#ifndef _PROFILE_H
#define _PROFILE_H 1