[postgis-tickets] r16133 - Start of X3D refactoring to address #3704, #3705 and other tickets.

Regina Obe lr at pcorp.us
Tue Dec 5 14:33:43 PST 2017


Author: robe
Date: 2017-12-05 14:33:43 -0800 (Tue, 05 Dec 2017)
New Revision: 16133

Added:
   trunk/liblwgeom/lwout_x3d.h
Modified:
   trunk/liblwgeom/lwout_x3d.c
Log:
Start of X3D refactoring to address #3704, #3705 and other tickets.  
Split out header from c file.

Modified: trunk/liblwgeom/lwout_x3d.c
===================================================================
--- trunk/liblwgeom/lwout_x3d.c	2017-11-30 21:41:38 UTC (rev 16132)
+++ trunk/liblwgeom/lwout_x3d.c	2017-12-05 22:33:43 UTC (rev 16133)
@@ -18,7 +18,7 @@
  *
  **********************************************************************
  *
- * Copyright 2011-2016 Arrival 3D, Regina Obe
+ * Copyright 2011-2017 Arrival 3D, Regina Obe
  *
  **********************************************************************/
 
@@ -26,35 +26,12 @@
 * @file X3D output routines.
 *
 **********************************************************************/
+#include "lwout_x3d.h"
 
-
-#include <string.h>
-#include "liblwgeom_internal.h"
-
-/** defid is the id of the coordinate can be used to hold other elements DEF='abc' transform='' etc. **/
-static size_t asx3d3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *defid);
-static size_t asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_line(const LWLINE *line, char *srs, int precision, int opts, const char *defid);
-static size_t asx3d3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *defid);
-static size_t asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid);
-static size_t asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precisioSn, int opts, const char *defid);
-static char *asx3d3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *defid);
-static size_t asx3d3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
-static char *asx3d3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
-static size_t pointArray_toX3D3(POINTARRAY *pa, char *buf, int precision, int opts, int is_closed);
-
-static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision);
-
-
 /*
  * VERSION X3D 3.0.2 http://www.web3d.org/specifications/x3d-3.0.dtd
  */
 
-
 /* takes a GEOMETRY and returns an X3D representation */
 extern char *
 lwgeom_to_x3d3(const LWGEOM *geom, char *srs, int precision, int opts, const char *defid)

Added: trunk/liblwgeom/lwout_x3d.h
===================================================================
--- trunk/liblwgeom/lwout_x3d.h	                        (rev 0)
+++ trunk/liblwgeom/lwout_x3d.h	2017-12-05 22:33:43 UTC (rev 16133)
@@ -0,0 +1,48 @@
+/**********************************************************************
+ *
+ * PostGIS - Spatial Types for PostgreSQL
+ * http://postgis.net
+ *
+ * PostGIS is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * PostGIS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with PostGIS.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ **********************************************************************
+ *
+ * Copyright 2011-2017 Arrival 3D, Regina Obe
+ *
+ **********************************************************************/
+
+/**
+* @file X3D output routines.
+*
+**********************************************************************/
+#include <string.h>
+#include "liblwgeom_internal.h"
+
+/** defid is the id of the coordinate can be used to hold other elements DEF='abc' transform='' etc. **/
+static size_t asx3d3_point_size(const LWPOINT *point, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_point(const LWPOINT *point, char *srs, int precision, int opts, const char *defid);
+static size_t asx3d3_line_size(const LWLINE *line, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_line(const LWLINE *line, char *srs, int precision, int opts, const char *defid);
+static size_t asx3d3_poly_size(const LWPOLY *poly, char *srs, int precision, int opts, const char *defid);
+static size_t asx3d3_triangle_size(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_triangle(const LWTRIANGLE *triangle, char *srs, int precision, int opts, const char *defid);
+static size_t asx3d3_multi_size(const LWCOLLECTION *col, char *srs, int precisioSn, int opts, const char *defid);
+static char *asx3d3_multi(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_psurface(const LWPSURFACE *psur, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_tin(const LWTIN *tin, char *srs, int precision, int opts, const char *defid);
+static size_t asx3d3_collection_size(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
+static char *asx3d3_collection(const LWCOLLECTION *col, char *srs, int precision, int opts, const char *defid);
+static size_t pointArray_toX3D3(POINTARRAY *pa, char *buf, int precision, int opts, int is_closed);
+
+static size_t pointArray_X3Dsize(POINTARRAY *pa, int precision);



More information about the postgis-tickets mailing list