PostGIS  3.3.9dev-r@@SVN_REVISION@@
lwout_svg.c
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  *
6  * PostGIS is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * PostGIS is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18  *
19  **********************************************************************
20  *
21  * Copyright 2001-2003 Refractions Research Inc.
22  *
23  **********************************************************************/
24 
25 
35 #include "liblwgeom_internal.h"
36 
37 static lwvarlena_t *assvg_point(const LWPOINT *point, int relative, int precision);
38 static lwvarlena_t *assvg_line(const LWLINE *line, int relative, int precision);
39 static lwvarlena_t *assvg_polygon(const LWPOLY *poly, int relative, int precision);
40 static lwvarlena_t *assvg_multipoint(const LWMPOINT *mpoint, int relative, int precision);
41 static lwvarlena_t *assvg_multiline(const LWMLINE *mline, int relative, int precision);
42 static lwvarlena_t *assvg_multipolygon(const LWMPOLY *mpoly, int relative, int precision);
43 static lwvarlena_t *assvg_collection(const LWCOLLECTION *col, int relative, int precision);
44 
45 static size_t assvg_geom_size(const LWGEOM *geom, int relative, int precision);
46 static size_t assvg_geom_buf(const LWGEOM *geom, char *output, int relative, int precision);
47 static size_t pointArray_svg_size(POINTARRAY *pa, int precision);
48 static size_t pointArray_svg_rel(POINTARRAY *pa, char * output, int close_ring, int precision);
49 static size_t pointArray_svg_abs(POINTARRAY *pa, char * output, int close_ring, int precision);
50 
51 
56 lwgeom_to_svg(const LWGEOM *geom, int precision, int relative)
57 {
58  lwvarlena_t *ret = NULL;
59  int type = geom->type;
60 
61  /* Empty varlena for empties */
62  if( lwgeom_is_empty(geom) )
63  {
66  return v;
67  }
68 
69  switch (type)
70  {
71  case POINTTYPE:
72  ret = assvg_point((LWPOINT*)geom, relative, precision);
73  break;
74  case LINETYPE:
75  ret = assvg_line((LWLINE*)geom, relative, precision);
76  break;
77  case POLYGONTYPE:
78  ret = assvg_polygon((LWPOLY*)geom, relative, precision);
79  break;
80  case MULTIPOINTTYPE:
81  ret = assvg_multipoint((LWMPOINT*)geom, relative, precision);
82  break;
83  case MULTILINETYPE:
84  ret = assvg_multiline((LWMLINE*)geom, relative, precision);
85  break;
86  case MULTIPOLYGONTYPE:
87  ret = assvg_multipolygon((LWMPOLY*)geom, relative, precision);
88  break;
89  case COLLECTIONTYPE:
90  ret = assvg_collection((LWCOLLECTION*)geom, relative, precision);
91  break;
92 
93  default:
94  lwerror("lwgeom_to_svg: '%s' geometry type not supported",
95  lwtype_name(type));
96  }
97 
98  return ret;
99 }
100 
101 
106 static size_t
107 assvg_point_size(__attribute__((__unused__)) const LWPOINT *point, int circle, int precision)
108 {
109  size_t size;
110 
111  size = (OUT_MAX_BYTES_DOUBLE + precision) * 2;
112  if (circle) size += sizeof("cx='' cy=''");
113  else size += sizeof("x='' y=''");
114 
115  return size;
116 }
117 
118 static size_t
119 assvg_point_buf(const LWPOINT *point, char * output, int circle, int precision)
120 {
121  char *ptr=output;
124  POINT2D pt;
125 
126  getPoint2d_p(point->point, 0, &pt);
127 
128  lwprint_double(pt.x, precision, x);
129  lwprint_double(-pt.y, precision, y);
130 
131  if (circle) ptr += sprintf(ptr, "x=\"%s\" y=\"%s\"", x, y);
132  else ptr += sprintf(ptr, "cx=\"%s\" cy=\"%s\"", x, y);
133 
134  return (ptr-output);
135 }
136 
137 static lwvarlena_t *
138 assvg_point(const LWPOINT *point, int circle, int precision)
139 {
140  size_t size = assvg_point_size(point, circle, precision);
141  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
142  size = assvg_point_buf(point, v->data, circle, precision);
143  LWSIZE_SET(v->size, LWVARHDRSZ + size);
144  return v;
145 }
146 
147 
152 static size_t
153 assvg_line_size(const LWLINE *line, __attribute__((__unused__)) int relative, int precision)
154 {
155  size_t size;
156 
157  size = sizeof("M ");
158  size += pointArray_svg_size(line->points, precision);
159 
160  return size;
161 }
162 
163 static size_t
164 assvg_line_buf(const LWLINE *line, char * output, int relative, int precision)
165 {
166  char *ptr=output;
167 
168  /* Start path with SVG MoveTo */
169  ptr += sprintf(ptr, "M ");
170  if (relative)
171  ptr += pointArray_svg_rel(line->points, ptr, 1, precision);
172  else
173  ptr += pointArray_svg_abs(line->points, ptr, 1, precision);
174 
175  return (ptr-output);
176 }
177 
178 static lwvarlena_t *
179 assvg_line(const LWLINE *line, int relative, int precision)
180 {
181  size_t size = assvg_line_size(line, relative, precision);
182  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
183  size = assvg_line_buf(line, v->data, relative, precision);
184  LWSIZE_SET(v->size, LWVARHDRSZ + size);
185  return v;
186 }
187 
188 
193 static size_t
194 assvg_polygon_size(const LWPOLY *poly, __attribute__((__unused__)) int relative, int precision)
195 {
196  uint32_t i;
197  size_t size=0;
198 
199  for (i=0; i<poly->nrings; i++)
200  size += pointArray_svg_size(poly->rings[i], precision) + sizeof(" ");
201  size += sizeof("M Z") * poly->nrings;
202 
203  return size;
204 }
205 
206 static size_t
207 assvg_polygon_buf(const LWPOLY *poly, char * output, int relative, int precision)
208 {
209  uint32_t i;
210  char *ptr=output;
211 
212  for (i=0; i<poly->nrings; i++)
213  {
214  if (i) ptr += sprintf(ptr, " "); /* Space beetween each ring */
215  ptr += sprintf(ptr, "M "); /* Start path with SVG MoveTo */
216 
217  if (relative)
218  {
219  ptr += pointArray_svg_rel(poly->rings[i], ptr, 0, precision);
220  ptr += sprintf(ptr, " z"); /* SVG closepath */
221  }
222  else
223  {
224  ptr += pointArray_svg_abs(poly->rings[i], ptr, 0, precision);
225  ptr += sprintf(ptr, " Z"); /* SVG closepath */
226  }
227  }
228 
229  return (ptr-output);
230 }
231 
232 static lwvarlena_t *
233 assvg_polygon(const LWPOLY *poly, int relative, int precision)
234 {
235  size_t size = assvg_polygon_size(poly, relative, precision);
236  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
237  size = assvg_polygon_buf(poly, v->data, relative, precision);
238  LWSIZE_SET(v->size, LWVARHDRSZ + size);
239  return v;
240 }
241 
242 
247 static size_t
248 assvg_multipoint_size(const LWMPOINT *mpoint, int relative, int precision)
249 {
250  const LWPOINT *point;
251  size_t size=0;
252  uint32_t i;
253 
254  for (i=0 ; i<mpoint->ngeoms ; i++)
255  {
256  point = mpoint->geoms[i];
257  size += assvg_point_size(point, relative, precision);
258  }
259  size += sizeof(",") * --i; /* Arbitrary comma separator */
260 
261  return size;
262 }
263 
264 static size_t
265 assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
266 {
267  const LWPOINT *point;
268  uint32_t i;
269  char *ptr=output;
270 
271  for (i=0 ; i<mpoint->ngeoms ; i++)
272  {
273  if (i) ptr += sprintf(ptr, ","); /* Arbitrary comma separator */
274  point = mpoint->geoms[i];
275  ptr += assvg_point_buf(point, ptr, relative, precision);
276  }
277 
278  return (ptr-output);
279 }
280 
281 static lwvarlena_t *
282 assvg_multipoint(const LWMPOINT *mpoint, int relative, int precision)
283 {
284  size_t size = assvg_multipoint_size(mpoint, relative, precision);
285  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
286  size = assvg_multipoint_buf(mpoint, v->data, relative, precision);
287  LWSIZE_SET(v->size, LWVARHDRSZ + size);
288  return v;
289 }
290 
291 
296 static size_t
297 assvg_multiline_size(const LWMLINE *mline, int relative, int precision)
298 {
299  const LWLINE *line;
300  size_t size=0;
301  uint32_t i;
302 
303  for (i=0 ; i<mline->ngeoms ; i++)
304  {
305  line = mline->geoms[i];
306  size += assvg_line_size(line, relative, precision);
307  }
308  size += sizeof(" ") * --i; /* SVG whitespace Separator */
309 
310  return size;
311 }
312 
313 static size_t
314 assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
315 {
316  const LWLINE *line;
317  uint32_t i;
318  char *ptr=output;
319 
320  for (i=0 ; i<mline->ngeoms ; i++)
321  {
322  if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */
323  line = mline->geoms[i];
324  ptr += assvg_line_buf(line, ptr, relative, precision);
325  }
326 
327  return (ptr-output);
328 }
329 
330 static lwvarlena_t *
331 assvg_multiline(const LWMLINE *mline, int relative, int precision)
332 {
333  size_t size = assvg_multiline_size(mline, relative, precision);
334  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
335  size = assvg_multiline_buf(mline, v->data, relative, precision);
336  LWSIZE_SET(v->size, LWVARHDRSZ + size);
337  return v;
338 }
339 
340 
341 /*
342  * Multipolygon Geometry
343  */
344 
345 static size_t
346 assvg_multipolygon_size(const LWMPOLY *mpoly, int relative, int precision)
347 {
348  const LWPOLY *poly;
349  size_t size=0;
350  uint32_t i;
351 
352  for (i=0 ; i<mpoly->ngeoms ; i++)
353  {
354  poly = mpoly->geoms[i];
355  size += assvg_polygon_size(poly, relative, precision);
356  }
357  size += sizeof(" ") * --i; /* SVG whitespace Separator */
358 
359  return size;
360 }
361 
362 static size_t
363 assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
364 {
365  const LWPOLY *poly;
366  uint32_t i;
367  char *ptr=output;
368 
369  for (i=0 ; i<mpoly->ngeoms ; i++)
370  {
371  if (i) ptr += sprintf(ptr, " "); /* SVG whitespace Separator */
372  poly = mpoly->geoms[i];
373  ptr += assvg_polygon_buf(poly, ptr, relative, precision);
374  }
375 
376  return (ptr-output);
377 }
378 
379 static lwvarlena_t *
380 assvg_multipolygon(const LWMPOLY *mpoly, int relative, int precision)
381 {
382  size_t size = assvg_multipolygon_size(mpoly, relative, precision);
383  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
384  size = assvg_multipolygon_buf(mpoly, v->data, relative, precision);
385  LWSIZE_SET(v->size, LWVARHDRSZ + size);
386  return v;
387 }
388 
389 
394 static size_t
395 assvg_collection_size(const LWCOLLECTION *col, int relative, int precision)
396 {
397  uint32_t i = 0;
398  size_t size=0;
399  const LWGEOM *subgeom;
400 
401  for (i=0; i<col->ngeoms; i++)
402  {
403  subgeom = col->geoms[i];
404  size += assvg_geom_size(subgeom, relative, precision);
405  }
406 
407  if ( i ) /* We have some geometries, so add space for delimiters. */
408  size += sizeof(";") * --i;
409 
410  if (size == 0) size++; /* GEOMETRYCOLLECTION EMPTY, space for null terminator */
411 
412  return size;
413 }
414 
415 static size_t
416 assvg_collection_buf(const LWCOLLECTION *col, char *output, int relative, int precision)
417 {
418  uint32_t i;
419  char *ptr=output;
420  const LWGEOM *subgeom;
421 
422  /* EMPTY GEOMETRYCOLLECTION */
423  if (col->ngeoms == 0) *ptr = '\0';
424 
425  for (i=0; i<col->ngeoms; i++)
426  {
427  if (i) ptr += sprintf(ptr, ";");
428  subgeom = col->geoms[i];
429  ptr += assvg_geom_buf(subgeom, ptr, relative, precision);
430  }
431 
432  return (ptr - output);
433 }
434 
435 static lwvarlena_t *
436 assvg_collection(const LWCOLLECTION *col, int relative, int precision)
437 {
438  size_t size = assvg_collection_size(col, relative, precision);
439  lwvarlena_t *v = lwalloc(LWVARHDRSZ + size);
440  size = assvg_collection_buf(col, v->data, relative, precision);
441  LWSIZE_SET(v->size, LWVARHDRSZ + size);
442  return v;
443 }
444 
445 
446 static size_t
447 assvg_geom_buf(const LWGEOM *geom, char *output, int relative, int precision)
448 {
449  int type = geom->type;
450  char *ptr=output;
451 
452  switch (type)
453  {
454  case POINTTYPE:
455  ptr += assvg_point_buf((LWPOINT*)geom, ptr, relative, precision);
456  break;
457 
458  case LINETYPE:
459  ptr += assvg_line_buf((LWLINE*)geom, ptr, relative, precision);
460  break;
461 
462  case POLYGONTYPE:
463  ptr += assvg_polygon_buf((LWPOLY*)geom, ptr, relative, precision);
464  break;
465 
466  case MULTIPOINTTYPE:
467  ptr += assvg_multipoint_buf((LWMPOINT*)geom, ptr, relative, precision);
468  break;
469 
470  case MULTILINETYPE:
471  ptr += assvg_multiline_buf((LWMLINE*)geom, ptr, relative, precision);
472  break;
473 
474  case MULTIPOLYGONTYPE:
475  ptr += assvg_multipolygon_buf((LWMPOLY*)geom, ptr, relative, precision);
476  break;
477 
478  default:
479  lwerror("assvg_geom_buf: '%s' geometry type not supported.",
480  lwtype_name(type));
481  }
482 
483  return (ptr-output);
484 }
485 
486 
487 static size_t
488 assvg_geom_size(const LWGEOM *geom, int relative, int precision)
489 {
490  int type = geom->type;
491  size_t size = 0;
492 
493  switch (type)
494  {
495  case POINTTYPE:
496  size = assvg_point_size((LWPOINT*)geom, relative, precision);
497  break;
498 
499  case LINETYPE:
500  size = assvg_line_size((LWLINE*)geom, relative, precision);
501  break;
502 
503  case POLYGONTYPE:
504  size = assvg_polygon_size((LWPOLY*)geom, relative, precision);
505  break;
506 
507  case MULTIPOINTTYPE:
508  size = assvg_multipoint_size((LWMPOINT*)geom, relative, precision);
509  break;
510 
511  case MULTILINETYPE:
512  size = assvg_multiline_size((LWMLINE*)geom, relative, precision);
513  break;
514 
515  case MULTIPOLYGONTYPE:
516  size = assvg_multipolygon_size((LWMPOLY*)geom, relative, precision);
517  break;
518 
519  default:
520  lwerror("assvg_geom_size: '%s' geometry type not supported.",
521  lwtype_name(type));
522  }
523 
524  return size;
525 }
526 
527 
528 static size_t
529 pointArray_svg_rel(POINTARRAY *pa, char *output, int close_ring, int precision)
530 {
531  int i, end;
532  char *ptr;
533  char sx[OUT_DOUBLE_BUFFER_SIZE];
534  char sy[OUT_DOUBLE_BUFFER_SIZE];
535  const POINT2D *pt;
536 
537  double f = 1.0;
538  double dx, dy, x, y, accum_x, accum_y;
539 
540  ptr = output;
541 
542  if (precision >= 0)
543  {
544  f = pow(10, precision);
545  }
546 
547  if (close_ring) end = pa->npoints;
548  else end = pa->npoints - 1;
549 
550  /* Starting point */
551  pt = getPoint2d_cp(pa, 0);
552 
553  x = round(pt->x*f)/f;
554  y = round(pt->y*f)/f;
555 
556  lwprint_double(x, precision, sx);
557  lwprint_double(-y, precision, sy);
558  ptr += sprintf(ptr,"%s %s l", sx, sy);
559 
560  /* accum */
561  accum_x = x;
562  accum_y = y;
563 
564  /* All the following ones */
565  for (i=1 ; i < end ; i++)
566  {
567  // lpt = pt;
568 
569  pt = getPoint2d_cp(pa, i);
570 
571  x = round(pt->x*f)/f;
572  y = round(pt->y*f)/f;
573  dx = x - accum_x;
574  dy = y - accum_y;
575 
576  lwprint_double(dx, precision, sx);
577  lwprint_double(-dy, precision, sy);
578 
579  accum_x += dx;
580  accum_y += dy;
581 
582  ptr += sprintf(ptr," %s %s", sx, sy);
583  }
584 
585  return (ptr-output);
586 }
587 
588 
592 static size_t
593 pointArray_svg_abs(POINTARRAY *pa, char *output, int close_ring, int precision)
594 {
595  int i, end;
596  char *ptr;
599  POINT2D pt;
600 
601  ptr = output;
602 
603  if (close_ring) end = pa->npoints;
604  else end = pa->npoints - 1;
605 
606  for (i=0 ; i < end ; i++)
607  {
608  getPoint2d_p(pa, i, &pt);
609 
610  lwprint_double(pt.x, precision, x);
611  lwprint_double(-pt.y, precision, y);
612 
613  if (i == 1) ptr += sprintf(ptr, " L ");
614  else if (i) ptr += sprintf(ptr, " ");
615  ptr += sprintf(ptr,"%s %s", x, y);
616  }
617 
618  return (ptr-output);
619 }
620 
621 
625 static size_t
627 {
628  return (OUT_MAX_BYTES_DOUBLE + precision + sizeof(" ")) * 2 * pa->npoints + sizeof(" L ");
629 }
static uint8_t precision
Definition: cu_in_twkb.c:25
#define COLLECTIONTYPE
Definition: liblwgeom.h:123
#define LWVARHDRSZ
Definition: liblwgeom.h:326
#define MULTILINETYPE
Definition: liblwgeom.h:121
#define LINETYPE
Definition: liblwgeom.h:118
#define MULTIPOINTTYPE
Definition: liblwgeom.h:120
int getPoint2d_p(const POINTARRAY *pa, uint32_t n, POINT2D *point)
Definition: lwgeom_api.c:343
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
Definition: liblwgeom.h:117
#define MULTIPOLYGONTYPE
Definition: liblwgeom.h:122
#define POLYGONTYPE
Definition: liblwgeom.h:119
#define __attribute__(x)
Definition: liblwgeom.h:243
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
Definition: lwutil.c:216
#define LWSIZE_SET(varsize, len)
Definition: liblwgeom.h:340
void * lwalloc(size_t size)
Definition: lwutil.c:227
#define OUT_MAX_BYTES_DOUBLE
#define OUT_DOUBLE_BUFFER_SIZE
int lwprint_double(double d, int maxdd, char *buf)
Definition: lwprint.c:463
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition: lwutil.c:190
static const POINT2D * getPoint2d_cp(const POINTARRAY *pa, uint32_t n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from.
Definition: lwinline.h:101
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
Definition: lwinline.h:203
static lwvarlena_t * assvg_multipolygon(const LWMPOLY *mpoly, int relative, int precision)
Definition: lwout_svg.c:380
static size_t assvg_multipoint_buf(const LWMPOINT *mpoint, char *output, int relative, int precision)
Definition: lwout_svg.c:265
static size_t assvg_geom_buf(const LWGEOM *geom, char *output, int relative, int precision)
Definition: lwout_svg.c:447
static size_t assvg_multipoint_size(const LWMPOINT *mpoint, int relative, int precision)
Multipoint Geometry.
Definition: lwout_svg.c:248
static size_t assvg_collection_buf(const LWCOLLECTION *col, char *output, int relative, int precision)
Definition: lwout_svg.c:416
static size_t assvg_multiline_buf(const LWMLINE *mline, char *output, int relative, int precision)
Definition: lwout_svg.c:314
static size_t assvg_line_buf(const LWLINE *line, char *output, int relative, int precision)
Definition: lwout_svg.c:164
lwvarlena_t * lwgeom_to_svg(const LWGEOM *geom, int precision, int relative)
Takes a GEOMETRY and returns a SVG representation.
Definition: lwout_svg.c:56
static size_t assvg_collection_size(const LWCOLLECTION *col, int relative, int precision)
Collection Geometry.
Definition: lwout_svg.c:395
static lwvarlena_t * assvg_multipoint(const LWMPOINT *mpoint, int relative, int precision)
Definition: lwout_svg.c:282
static size_t assvg_line_size(const LWLINE *line, __attribute__((__unused__)) int relative, int precision)
Line Geometry.
Definition: lwout_svg.c:153
static size_t assvg_multipolygon_size(const LWMPOLY *mpoly, int relative, int precision)
Definition: lwout_svg.c:346
static size_t pointArray_svg_rel(POINTARRAY *pa, char *output, int close_ring, int precision)
Definition: lwout_svg.c:529
static lwvarlena_t * assvg_multiline(const LWMLINE *mline, int relative, int precision)
Definition: lwout_svg.c:331
static size_t assvg_point_buf(const LWPOINT *point, char *output, int circle, int precision)
Definition: lwout_svg.c:119
static lwvarlena_t * assvg_point(const LWPOINT *point, int relative, int precision)
Definition: lwout_svg.c:138
static lwvarlena_t * assvg_polygon(const LWPOLY *poly, int relative, int precision)
Definition: lwout_svg.c:233
static lwvarlena_t * assvg_line(const LWLINE *line, int relative, int precision)
Definition: lwout_svg.c:179
static size_t assvg_multiline_size(const LWMLINE *mline, int relative, int precision)
Multiline Geometry.
Definition: lwout_svg.c:297
static size_t assvg_point_size(__attribute__((__unused__)) const LWPOINT *point, int circle, int precision)
Point Geometry.
Definition: lwout_svg.c:107
static lwvarlena_t * assvg_collection(const LWCOLLECTION *col, int relative, int precision)
Definition: lwout_svg.c:436
static size_t pointArray_svg_abs(POINTARRAY *pa, char *output, int close_ring, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_svg.c:593
static size_t assvg_geom_size(const LWGEOM *geom, int relative, int precision)
Definition: lwout_svg.c:488
static size_t assvg_polygon_size(const LWPOLY *poly, __attribute__((__unused__)) int relative, int precision)
Polygon Geometry.
Definition: lwout_svg.c:194
static size_t pointArray_svg_size(POINTARRAY *pa, int precision)
Returns maximum size of rendered pointarray in bytes.
Definition: lwout_svg.c:626
static size_t assvg_multipolygon_buf(const LWMPOLY *mpoly, char *output, int relative, int precision)
Definition: lwout_svg.c:363
static size_t assvg_polygon_buf(const LWPOLY *poly, char *output, int relative, int precision)
Definition: lwout_svg.c:207
type
Definition: ovdump.py:42
uint32_t ngeoms
Definition: liblwgeom.h:595
LWGEOM ** geoms
Definition: liblwgeom.h:590
uint8_t type
Definition: liblwgeom.h:477
POINTARRAY * points
Definition: liblwgeom.h:498
LWLINE ** geoms
Definition: liblwgeom.h:562
uint32_t ngeoms
Definition: liblwgeom.h:567
uint32_t ngeoms
Definition: liblwgeom.h:553
LWPOINT ** geoms
Definition: liblwgeom.h:548
uint32_t ngeoms
Definition: liblwgeom.h:581
LWPOLY ** geoms
Definition: liblwgeom.h:576
POINTARRAY * point
Definition: liblwgeom.h:486
POINTARRAY ** rings
Definition: liblwgeom.h:534
uint32_t nrings
Definition: liblwgeom.h:539
double y
Definition: liblwgeom.h:405
double x
Definition: liblwgeom.h:405
uint32_t npoints
Definition: liblwgeom.h:442
uint32_t size
Definition: liblwgeom.h:322
char data[]
Definition: liblwgeom.h:323