SpatiaLite  5.0.0
gg_dxf.h
Go to the documentation of this file.
1 /*
2  gg_dxf.h -- Gaia common support for DXF files
3 
4  version 5.0, 2020 August 1
5 
6  Author: Sandro Furieri a.furieri@lqt.it
7 
8  ------------------------------------------------------------------------------
9 
10  Version: MPL 1.1/GPL 2.0/LGPL 2.1
11 
12  The contents of this file are subject to the Mozilla Public License Version
13  1.1 (the "License"); you may not use this file except in compliance with
14  the License. You may obtain a copy of the License at
15  http://www.mozilla.org/MPL/
16 
17 Software distributed under the License is distributed on an "AS IS" basis,
18 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
19 for the specific language governing rights and limitations under the
20 License.
21 
22 The Original Code is the SpatiaLite library
23 
24 The Initial Developer of the Original Code is Alessandro Furieri
25 
26 Portions created by the Initial Developer are Copyright (C) 2008-2020
27 the Initial Developer. All Rights Reserved.
28 
29 Contributor(s):
30 
31 Alternatively, the contents of this file may be used under the terms of
32 either the GNU General Public License Version 2 or later (the "GPL"), or
33 the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
34 in which case the provisions of the GPL or the LGPL are applicable instead
35 of those above. If you wish to allow use of your version of this file only
36 under the terms of either the GPL or the LGPL, and not to allow others to
37 use your version of this file under the terms of the MPL, indicate your
38 decision by deleting the provisions above and replace them with the notice
39 and other provisions required by the GPL or the LGPL. If you do not delete
40 the provisions above, a recipient may use your version of this file under
41 the terms of any one of the MPL, the GPL or the LGPL.
42 
43 */
44 
45 
52 #ifndef _GG_DXF_H
53 #ifndef DOXYGEN_SHOULD_SKIP_THIS
54 #define _GG_DXF_H
55 #endif
56 
57 #ifdef __cplusplus
58 extern "C"
59 {
60 #endif
61 
62 /* constant values for DXF */
63 
65 #define GAIA_DXF_IMPORT_BY_LAYER 1
66 
67 #define GAIA_DXF_IMPORT_MIXED 2
68 
69 #define GAIA_DXF_AUTO_2D_3D 3
70 
71 #define GAIA_DXF_FORCE_2D 4
72 
73 #define GAIA_DXF_FORCE_3D 5
74 
75 #define GAIA_DXF_RING_NONE 6
76 
77 #define GAIA_DXF_RING_LINKED 7
78 
79 #define GAIA_DXF_RING_UNLINKED 8
80 
81 
83 #define GAIA_DXF_V12 1000
84 
85 /* data structs */
86 
87 
91  typedef struct gaia_dxf_extra_attr
92  {
94  char *key;
96  char *value;
106 
110  typedef struct gaia_dxf_insert
111  {
113  char *block_id;
115  double x;
117  double y;
119  double z;
121  double scale_x;
123  double scale_y;
125  double scale_z;
127  double angle;
129  int hasText;
131  int hasPoint;
133  int hasLine;
135  int hasPolyg;
137  int hasHatch;
139  int is3Dtext;
143  int is3Dline;
152  } gaiaDxfInsert;
159 
163  typedef struct gaia_dxf_text
164  {
166  char *label;
168  double x;
170  double y;
172  double z;
174  double angle;
181  } gaiaDxfText;
188 
192  typedef struct gaia_dxf_point
193  {
195  double x;
197  double y;
199  double z;
206  } gaiaDxfPoint;
213 
217  typedef struct gaia_dxf_circle
218  {
220  double cx;
222  double cy;
224  double cz;
226  double radius;
227  } gaiaDxfCircle;
234 
238  typedef struct gaia_dxf_arc
239  {
241  double cx;
243  double cy;
245  double cz;
247  double radius;
249  double start;
251  double stop;
252  } gaiaDxfArc;
259 
263  typedef struct gaia_dxf_hole
264  {
266  int points;
268  double *x;
270  double *y;
272  double *z;
275  } gaiaDxfHole;
282 
287  typedef struct gaia_dxf_polyline
288  {
292  int points;
294  double *x;
296  double *y;
298  double *z;
309  } gaiaDxfPolyline;
319  typedef struct gaia_dxf_hatch_segm
320  {
322  double x0;
324  double y0;
326  double x1;
328  double y1;
338 
342  typedef struct gaia_dxf_boundary_path
343  {
357 
361  typedef struct gaia_dxf_hatch
362  {
364  double spacing;
366  double angle;
368  double base_x;
370  double base_y;
372  double offset_x;
374  double offset_y;
387  } gaiaDxfHatch;
394 
398  typedef struct gaia_dxf_block
399  {
403  char *layer_name;
405  char *block_id;
427  int is3Dtext;
431  int is3Dline;
436  } gaiaDxfBlock;
443 
447  typedef struct gaia_dxf_layer
448  {
450  char *layer_name;
492  int is3Dtext;
496  int is3Dline;
525  } gaiaDxfLayer;
532 
536  typedef struct gaia_dxf_parser
537  {
539  char *filename;
551  int srid;
553  const char *selected_layer;
555  const char *prefix;
561  int line_no;
565  int op_code;
567  int section;
569  int tables;
571  int blocks;
573  int entities;
575  int is_layer;
577  int is_block;
579  int is_text;
581  int is_point;
587  int is_line;
591  int is_arc;
595  int is_hatch;
601  int eof;
603  int error;
627  char *extra_key;
629  char *extra_value;
638  } gaiaDxfParser;
645 
649  typedef struct gaia_dxf_write
650  {
652  FILE *out;
656  int version;
658  int count;
660  int error;
661  } gaiaDxfWriter;
666 
667 
668 /* function prototypes */
669 
670 
692  GAIAGEO_DECLARE gaiaDxfParserPtr gaiaCreateDxfParser (int srid,
693  int force_dims,
694  const char *prefix,
695  const char
696  *selected_layer,
697  int special_rings);
698 
709  GAIAGEO_DECLARE void gaiaDestroyDxfParser (gaiaDxfParserPtr parser);
710 
727  GAIAGEO_DECLARE int gaiaParseDxfFile (gaiaDxfParserPtr parser,
728  const char *dxf_path);
729 
747  GAIAGEO_DECLARE int gaiaParseDxfFile_r (const void *p_cache,
748  gaiaDxfParserPtr parser,
749  const char *dxf_path);
750 
769  GAIAGEO_DECLARE int gaiaLoadFromDxfParser (sqlite3 * db_handle,
770  gaiaDxfParserPtr parser,
771  int mode, int append);
772 
785  GAIAGEO_DECLARE int gaiaDxfWriterInit (gaiaDxfWriterPtr dxf,
786  FILE * out, int precision,
787  int version);
788 
804  GAIAGEO_DECLARE int
805  gaiaDxfWriteHeader (gaiaDxfWriterPtr dxf, double minx, double miny,
806  double minz, double maxx, double maxy, double maxz);
807 
817  GAIAGEO_DECLARE int gaiaDxfWriteFooter (gaiaDxfWriterPtr dxf);
818 
828  GAIAGEO_DECLARE int gaiaDxfWriteTables (gaiaDxfWriterPtr dxf);
829 
840  GAIAGEO_DECLARE int gaiaDxfWriteLayer (gaiaDxfWriterPtr dxf,
841  const char *layer_name);
842 
853  GAIAGEO_DECLARE int gaiaDxfWriteEntities (gaiaDxfWriterPtr dxf);
854 
864  GAIAGEO_DECLARE int gaiaDxfWriteEndSection (gaiaDxfWriterPtr dxf);
865 
880  GAIAGEO_DECLARE int gaiaDxfWritePoint (gaiaDxfWriterPtr dxf,
881  const char *layer_name, double x,
882  double y, double z);
883 
901  GAIAGEO_DECLARE int gaiaDxfWriteText (gaiaDxfWriterPtr dxf,
902  const char *layer_name, double x,
903  double y, double z,
904  const char *label,
905  double text_height, double angle);
906 
919  GAIAGEO_DECLARE int
920  gaiaDxfWriteLine (gaiaDxfWriterPtr dxf, const char *layer_name,
921  gaiaLinestringPtr line);
922 
935  GAIAGEO_DECLARE int
936  gaiaDxfWriteRing (gaiaDxfWriterPtr dxf, const char *layer_name,
937  gaiaRingPtr ring);
938 
954  GAIAGEO_DECLARE int
955  gaiaDxfWriteGeometry (gaiaDxfWriterPtr dxf, const char *layer_name,
956  const char *label, double text_height,
957  double text_rotation, gaiaGeomCollPtr geometry);
958 
981  GAIAGEO_DECLARE int
982  gaiaExportDxf (gaiaDxfWriterPtr dxf, sqlite3 * db_handle,
983  const char *sql, const char *layer_col_name,
984  const char *geom_col_name, const char *label_col_name,
985  const char *text_height_col_name,
986  const char *text_rotation_col_name,
987  gaiaGeomCollPtr geom_filter);
988 
989 #ifdef __cplusplus
990 }
991 #endif
992 
993 #endif /* _GG_DXF_H */
GAIAGEO_DECLARE int gaiaParseDxfFile(gaiaDxfParserPtr parser, const char *dxf_path)
Parsing a DXF file.
struct gaia_dxf_arc gaiaDxfArc
wrapper for DXF Arc object
struct gaia_dxf_boundary_path * next
pointer to next item [linked list]
Definition: gg_dxf.h:349
gaiaDxfBlock curr_block
internal parser variable
Definition: gg_dxf.h:611
int srid
IN: parser option - the SRID.
Definition: gg_dxf.h:551
struct gaia_dxf_hole gaiaDxfHole
wrapper for DXF Polygon interior hole object
int hasPolyg
boolean flag: contains Polyline (Polygon) objects
Definition: gg_dxf.h:135
wrapper for DXF Polygon interior hole object
Definition: gg_dxf.h:263
char * filename
OUT: origin/input filename.
Definition: gg_dxf.h:539
struct gaia_dxf_text gaiaDxfText
wrapper for DXF Text object
int hasExtraText
boolean flag: contains Text Extra Attributes
Definition: gg_dxf.h:508
double cz
Center Z coordinate.
Definition: gg_dxf.h:224
int tables
internal parser variable
Definition: gg_dxf.h:569
int is_point
internal parser variable
Definition: gg_dxf.h:581
int is_hatch
internal parser variable
Definition: gg_dxf.h:595
int points
total count of points
Definition: gg_dxf.h:292
int blocks
internal parser variable
Definition: gg_dxf.h:571
gaiaDxfPoint * gaiaDxfPointPtr
Typedef for DXF Point object.
Definition: gg_dxf.h:212
int linked_rings
IN: parser option - linked rings special handling.
Definition: gg_dxf.h:557
int hasText
boolean flag: contains Text objects
Definition: gg_dxf.h:129
double y
Y coordinate.
Definition: gg_dxf.h:170
double scale_y
Y scale factor.
Definition: gg_dxf.h:123
gaiaDxfInsertPtr last_ins_point
pointer to last DXF Insert Point object [linked list]
Definition: gg_dxf.h:478
wrapper for DXF Point object
Definition: gg_dxf.h:192
gaiaDxfPolylinePtr first_polyg
pointer to first DXF Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:419
gaiaDxfPoint curr_point
internal parser variable
Definition: gg_dxf.h:613
double stop
stop angle
Definition: gg_dxf.h:251
struct gaia_dxf_write gaiaDxfWriter
wrapper for DXF Write object
double offset_x
hatch line offset X
Definition: gg_dxf.h:372
double radius
radius
Definition: gg_dxf.h:247
GAIAGEO_DECLARE int gaiaDxfWriterInit(gaiaDxfWriterPtr dxf, FILE *out, int precision, int version)
Initializing a DXF Writer Object.
GAIAGEO_DECLARE int gaiaDxfWriteEndSection(gaiaDxfWriterPtr dxf)
Writing a DXF Entities Section Header.
struct gaia_dxf_polyline gaiaDxfPolyline
wrapper for DXF Polyline object could be a Linestring or a Polygon depending on the is_closed flag
int is3Dpoint
boolean flag: contains 3d Point objects
Definition: gg_dxf.h:429
gaiaDxfPolylinePtr last_line
pointer to last DXF Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:417
gaiaDxfInsertPtr last_ins_line
pointer to last DXF Insert Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:482
gaiaDxfLayerPtr last_layer
OUT: pointer to last DXF Layer object [linked list].
Definition: gg_dxf.h:543
int undeclared_layers
internal parser variable
Definition: gg_dxf.h:637
gaiaDxfExtraAttr * gaiaDxfExtraAttrPtr
Typedef for DXF Extra Attribute object.
Definition: gg_dxf.h:105
GAIAGEO_DECLARE int gaiaParseDxfFile_r(const void *p_cache, gaiaDxfParserPtr parser, const char *dxf_path)
Parsing a DXF file.
double * z
array of Z coordinates
Definition: gg_dxf.h:298
gaiaDxfPolylinePtr first_polyg
pointer to first DXF Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:464
int is3Dline
boolean flag: contains 3d Polyline (Linestring) objects
Definition: gg_dxf.h:496
double angle
rotation angle
Definition: gg_dxf.h:127
int hasExtraInsPolyg
boolean flag: contains Insert Polyline (Polygon) Extra Attributes
Definition: gg_dxf.h:522
gaiaDxfHatchPtr curr_hatch
internal parser variable
Definition: gg_dxf.h:635
gaiaDxfPointPtr first_point
pointer to first DXF Point object [linked list]
Definition: gg_dxf.h:411
gaiaDxfExtraAttrPtr last_ext
internal parser variable
Definition: gg_dxf.h:633
int count
OUT: count of exported geometries.
Definition: gg_dxf.h:658
double * x
array of X coordinates
Definition: gg_dxf.h:268
int is_line
internal parser variable
Definition: gg_dxf.h:587
wrapper for DXF Parser object
Definition: gg_dxf.h:536
char * curr_layer_name
internal parser variable
Definition: gg_dxf.h:605
double start
start angle
Definition: gg_dxf.h:249
double x0
start X
Definition: gg_dxf.h:322
struct gaia_dxf_extra_attr gaiaDxfExtraAttr
wrapper for DXF Extra Attribute object
double base_x
hatch line base X
Definition: gg_dxf.h:368
gaiaDxfText * gaiaDxfTextPtr
Typedef for DXF Text object.
Definition: gg_dxf.h:187
struct gaia_dxf_hatch_segm gaiaDxfHatchSegm
wrapper for DXF Pattern Segment object
char * block_id
pointer to Block ID string
Definition: gg_dxf.h:405
int is_closed
open (Linestring) or closed (Polygon exterior ring)
Definition: gg_dxf.h:290
gaiaDxfBlockPtr last_block
OUT: pointer to last DXF Block object [linked list].
Definition: gg_dxf.h:547
gaiaDxfTextPtr last_text
pointer to last DXF Text object [linked list]
Definition: gg_dxf.h:454
double y1
end Y
Definition: gg_dxf.h:328
gaiaDxfInsert * gaiaDxfInsertPtr
Typedef for DXF Insert object.
Definition: gg_dxf.h:158
wrapper for DXF Extra Attribute object
Definition: gg_dxf.h:91
wrapper for DXF Boundary Path object
Definition: gg_dxf.h:342
GAIAGEO_DECLARE int gaiaDxfWriteHeader(gaiaDxfWriterPtr dxf, double minx, double miny, double minz, double maxx, double maxy, double maxz)
Writing the DXF Header.
int error
internal parser variable
Definition: gg_dxf.h:603
const char * selected_layer
IN: parser option - pointer the single Layer Name string.
Definition: gg_dxf.h:553
struct gaia_dxf_block * next
pointer to next item [linked list]
Definition: gg_dxf.h:435
int is3Dtext
boolean flag: contains 3d Text objects
Definition: gg_dxf.h:427
int is_vertex
internal parser variable
Definition: gg_dxf.h:593
GAIAGEO_DECLARE int gaiaDxfWriteLine(gaiaDxfWriterPtr dxf, const char *layer_name, gaiaLinestringPtr line)
Writing a DXF Polyline (opened) Entity.
gaiaDxfExtraAttrPtr first
pointer to first Extra Attribute [linked list]
Definition: gg_dxf.h:176
int is3Dpoint
boolean flag: contains 3d Point objects
Definition: gg_dxf.h:494
int is_hatch_boundary
internal parser variable
Definition: gg_dxf.h:597
int eof
internal parser variable
Definition: gg_dxf.h:601
gaiaDxfBlockPtr first_block
OUT: pointer to first DXF Block object [linked list].
Definition: gg_dxf.h:545
int is_polyline
internal parser variable
Definition: gg_dxf.h:583
int is3Dtext
boolean flag: contains 3d Text objects
Definition: gg_dxf.h:492
double x1
end X
Definition: gg_dxf.h:326
gaiaDxfInsertPtr first_ins_text
pointer to first DXF Insert Text object [linked list]
Definition: gg_dxf.h:472
GAIAGEO_DECLARE int gaiaDxfWritePoint(gaiaDxfWriterPtr dxf, const char *layer_name, double x, double y, double z)
Writing a DXF Point Entity.
gaiaDxfPolyline * gaiaDxfPolylinePtr
Typedef for DXF Polyline object.
Definition: gg_dxf.h:315
int hasPoint
boolean flag: contains Point objects
Definition: gg_dxf.h:131
gaiaDxfArc * gaiaDxfArcPtr
Typedef for DXF Arc object.
Definition: gg_dxf.h:258
int is_arc
internal parser variable
Definition: gg_dxf.h:591
gaiaDxfInsert curr_insert
internal parser variable
Definition: gg_dxf.h:609
gaiaDxfExtraAttrPtr first
pointer to first Extra Attribute [linked list]
Definition: gg_dxf.h:201
gaiaDxfExtraAttrPtr last
pointer to last Extra Attribute [linked list]
Definition: gg_dxf.h:149
double x
X coordinate.
Definition: gg_dxf.h:168
struct gaia_dxf_boundary_path gaiaDxfBoundaryPath
wrapper for DXF Boundary Path object
gaiaDxfTextPtr last_text
pointer to last DXF Text object [linked list]
Definition: gg_dxf.h:409
double offset_y
hatch line offset Y
Definition: gg_dxf.h:374
int is_insert
internal parser variable
Definition: gg_dxf.h:599
gaiaDxfHole * gaiaDxfHolePtr
Typedef for DXF Point object.
Definition: gg_dxf.h:281
double z
Z coordinate.
Definition: gg_dxf.h:172
char * extra_value
internal parser variable
Definition: gg_dxf.h:629
gaiaDxfInsertPtr first_ins_hatch
pointer to first DXF Insert Hatch object [linked list]
Definition: gg_dxf.h:488
gaiaDxfInsertPtr first_ins_point
pointer to first DXF Insert Point object [linked list]
Definition: gg_dxf.h:476
gaiaDxfText curr_text
internal parser variable
Definition: gg_dxf.h:607
double cx
Center X coordinate.
Definition: gg_dxf.h:220
int error
OUT: error flag.
Definition: gg_dxf.h:660
struct gaia_dxf_parser gaiaDxfParser
wrapper for DXF Parser object
gaiaDxfHatchPtr first_hatch
pointer to first DXF Hatch object [linked list]
Definition: gg_dxf.h:468
int is3Dline
boolean flag: contains 3d Polyline (Linestring) objects
Definition: gg_dxf.h:143
gaiaDxfExtraAttrPtr last
pointer to last Extra Attribute [linked list]
Definition: gg_dxf.h:203
double x
X coordinate.
Definition: gg_dxf.h:115
char * value
pointer to Extra Attribute Value string
Definition: gg_dxf.h:96
GAIAGEO_DECLARE int gaiaDxfWriteGeometry(gaiaDxfWriterPtr dxf, const char *layer_name, const char *label, double text_height, double text_rotation, gaiaGeomCollPtr geometry)
Writing a DXF generic Entity.
wrapper for DXF Layer object
Definition: gg_dxf.h:447
struct gaia_dxf_hatch_segm * next
pointer to next item [linked list]
Definition: gg_dxf.h:330
double angle
label rotation angle
Definition: gg_dxf.h:174
wrapper for DXF Polyline object could be a Linestring or a Polygon depending on the is_closed flag
Definition: gg_dxf.h:287
int op_code_line
internal parser variable
Definition: gg_dxf.h:563
gaiaDxfHatch * gaiaDxfHatchPtr
Typedef for DXF Hatch object.
Definition: gg_dxf.h:393
wrapper for DXF Write object
Definition: gg_dxf.h:649
int is3Dpolyg
boolean flag: contains 3d Polyline (Polygon) objects
Definition: gg_dxf.h:498
int is_block
internal parser variable
Definition: gg_dxf.h:577
double cy
Center Y coordinate.
Definition: gg_dxf.h:222
int is3Dpolyg
boolean flag: contains 3d Polyline (Polygon) objects
Definition: gg_dxf.h:145
struct gaia_dxf_point gaiaDxfPoint
wrapper for DXF Point object
Container for OGC RING Geometry.
Definition: gg_structs.h:158
double base_y
hatch line base Y
Definition: gg_dxf.h:370
gaiaDxfHatchSegmPtr first
pointer to first segment
Definition: gg_dxf.h:345
gaiaDxfPoint curr_end_point
internal parser variable
Definition: gg_dxf.h:615
int hasExtraPoint
boolean flag: contains Point Extra Attributes
Definition: gg_dxf.h:510
int is3DinsPolyg
boolean flag: contains 3d Insert Polyline (Polygon) objects
Definition: gg_dxf.h:506
double y0
start Y
Definition: gg_dxf.h:324
gaiaDxfLayerPtr first_layer
OUT: pointer to first DXF Layer object [linked list].
Definition: gg_dxf.h:541
gaiaDxfPointPtr last_pt
internal parser variable
Definition: gg_dxf.h:625
char * label
pointer to Label string
Definition: gg_dxf.h:166
GAIAGEO_DECLARE int gaiaLoadFromDxfParser(sqlite3 *db_handle, gaiaDxfParserPtr parser, int mode, int append)
Populating a DB so to permanently store all Geometries from a DXF Parser.
GAIAGEO_DECLARE int gaiaDxfWriteFooter(gaiaDxfWriterPtr dxf)
Writing a DXF Entities Section Header.
int precision
IN: coord's precision (number of decimal digits)
Definition: gg_dxf.h:654
gaiaDxfExtraAttrPtr first_ext
internal parser variable
Definition: gg_dxf.h:631
gaiaDxfPolylinePtr last_polyg
pointer to last DXF Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:421
GAIAGEO_DECLARE gaiaDxfParserPtr gaiaCreateDxfParser(int srid, int force_dims, const char *prefix, const char *selected_layer, int special_rings)
Creates a DXF Parser object.
gaiaDxfBlock * gaiaDxfBlockPtr
Typedef for DXF Block object.
Definition: gg_dxf.h:442
GAIAGEO_DECLARE int gaiaDxfWriteText(gaiaDxfWriterPtr dxf, const char *layer_name, double x, double y, double z, const char *label, double text_height, double angle)
Writing a DXF Text Entity.
gaiaGeomCollPtr boundary
pointer to Boundary geometry
Definition: gg_dxf.h:380
struct gaia_dxf_polyline * next
pointer to next item [linked list]
Definition: gg_dxf.h:308
double z
Z coordinate.
Definition: gg_dxf.h:119
int version
IN: DXF version number.
Definition: gg_dxf.h:656
char * block_id
pointer to Block ID string
Definition: gg_dxf.h:113
wrapper for DXF Arc object
Definition: gg_dxf.h:238
double y
Y coordinate.
Definition: gg_dxf.h:197
GAIAGEO_DECLARE int gaiaDxfWriteRing(gaiaDxfWriterPtr dxf, const char *layer_name, gaiaRingPtr ring)
Writing a DXF Polyline (closed) Entity.
GAIAGEO_DECLARE void gaiaDestroyDxfParser(gaiaDxfParserPtr parser)
Destroying a DXF Parser object.
struct gaia_dxf_block gaiaDxfBlock
wrapper for DXF Block object
int hasExtraInsLine
boolean flag: contains Insert Polyline (Linestring) Extra Attributes
Definition: gg_dxf.h:520
gaiaDxfPolylinePtr first_line
pointer to first DXF Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:460
int hasInsert
Boolean flag: this block is referenced by some Insert.
Definition: gg_dxf.h:401
gaiaDxfHatchSegmPtr last_out
pointer to last Pattern segment
Definition: gg_dxf.h:384
struct gaia_dxf_text * next
pointer to next item [linked list]
Definition: gg_dxf.h:180
wrapper for DXF Pattern Segment object
Definition: gg_dxf.h:319
int entities
internal parser variable
Definition: gg_dxf.h:573
gaiaDxfInsertPtr last_ins_polyg
pointer to last DXF Insert Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:486
gaiaDxfExtraAttrPtr first
pointer to first Extra Attribute [linked list]
Definition: gg_dxf.h:147
int hasExtraInsText
boolean flag: contains Insert Text Extra Attributes
Definition: gg_dxf.h:516
gaiaDxfInsertPtr last_ins_text
pointer to last DXF Insert Text object [linked list]
Definition: gg_dxf.h:474
GAIAGEO_DECLARE int gaiaDxfWriteLayer(gaiaDxfWriterPtr dxf, const char *layer_name)
Writing a DXF Table/Layer definition.
int is3Dpolyg
boolean flag: contains 3d Polyline (Polygon) objects
Definition: gg_dxf.h:433
Container for OGC LINESTRING Geometry.
Definition: gg_structs.h:128
double * y
array of Y coordinates
Definition: gg_dxf.h:296
struct gaia_dxf_hatch * next
pointer to next item [linked list]
Definition: gg_dxf.h:386
gaiaDxfPolylinePtr first_line
pointer to first DXF Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:415
gaiaDxfBoundaryPathPtr first
pointer to first Boundary
Definition: gg_dxf.h:376
GAIAGEO_DECLARE int gaiaExportDxf(gaiaDxfWriterPtr dxf, sqlite3 *db_handle, const char *sql, const char *layer_col_name, const char *geom_col_name, const char *label_col_name, const char *text_height_col_name, const char *text_rotation_col_name, gaiaGeomCollPtr geom_filter)
Exporting a complex DXF file.
int is_closed_polyline
internal parser variable
Definition: gg_dxf.h:621
double * x
array of X coordinates
Definition: gg_dxf.h:294
GAIAGEO_DECLARE int gaiaDxfWriteTables(gaiaDxfWriterPtr dxf)
Writing the DXF Tables Section Header.
int hasExtraInsPoint
boolean flag: contains Insert Text Extra Attributes
Definition: gg_dxf.h:518
gaiaDxfLayer * gaiaDxfLayerPtr
Typedef for DXF Layer object.
Definition: gg_dxf.h:531
double y
Y coordinate.
Definition: gg_dxf.h:117
gaiaDxfPointPtr first_pt
internal parser variable
Definition: gg_dxf.h:623
int unlinked_rings
IN: parser option - unlinked rings special handling.
Definition: gg_dxf.h:559
double scale_z
Z scale factor.
Definition: gg_dxf.h:125
wrapper for DXF Pattern Hatch object
Definition: gg_dxf.h:361
gaiaDxfHatchSegmPtr last
pointer to last segment
Definition: gg_dxf.h:347
struct gaia_dxf_insert * next
pointer to next item [linked list]
Definition: gg_dxf.h:151
gaiaDxfPointPtr last_point
pointer to lasst DXF Point object [linked list]
Definition: gg_dxf.h:458
char * layer_name
pointer to Layer Name string
Definition: gg_dxf.h:450
gaiaDxfHatchPtr first_hatch
pointer to first DXF Hatch object [linked list]
Definition: gg_dxf.h:423
struct gaia_dxf_extra_attr * next
pointer to next item [linked list]
Definition: gg_dxf.h:98
gaiaDxfTextPtr first_text
pointer to first DXF Text object [linked list]
Definition: gg_dxf.h:452
gaiaDxfArc curr_arc
internal parser variable
Definition: gg_dxf.h:619
int hasExtraLine
boolean flag: contains Polyline (Linestring) Extra Attributes
Definition: gg_dxf.h:512
char * key
pointer to Extra Attribute Key value
Definition: gg_dxf.h:94
struct gaia_dxf_layer * next
pointer to next item [linked list]
Definition: gg_dxf.h:524
double * y
array of Y coordinates
Definition: gg_dxf.h:270
gaiaDxfExtraAttrPtr first
pointer to first Extra Attribute [linked list]
Definition: gg_dxf.h:304
gaiaDxfHatchSegmPtr first_out
pointer to first Pattern segment
Definition: gg_dxf.h:382
struct gaia_dxf_point * next
pointer to next item [linked list]
Definition: gg_dxf.h:205
double angle
hatch line angle
Definition: gg_dxf.h:366
struct gaia_dxf_hatch gaiaDxfHatch
wrapper for DXF Pattern Hatch object
gaiaDxfParser * gaiaDxfParserPtr
Typedef for DXF Layer object.
Definition: gg_dxf.h:644
double spacing
hatch pattern spacing
Definition: gg_dxf.h:364
int is_lwpolyline
internal parser variable
Definition: gg_dxf.h:585
int hasExtraPolyg
boolean flag: contains Polyline (Polygon) Extra Attributes
Definition: gg_dxf.h:514
gaiaDxfBoundaryPathPtr last
pointer to last Boundary
Definition: gg_dxf.h:378
const char * prefix
IN: parser option - pointer to prefix string for DB tables.
Definition: gg_dxf.h:555
gaiaDxfInsertPtr last_ins_hatch
pointer to last DXF Insert Hatch object [linked list]
Definition: gg_dxf.h:490
gaiaDxfTextPtr first_text
pointer to first DXF Text object [linked list]
Definition: gg_dxf.h:407
int line_no
internal parser variable
Definition: gg_dxf.h:561
struct gaia_dxf_circle gaiaDxfCircle
wrapper for DXF Circle object
int hasLine
boolean flag: contains Polyline (Linestring) objects
Definition: gg_dxf.h:133
gaiaDxfPolylinePtr last_line
pointer to last DXF Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:462
gaiaDxfHolePtr last_hole
pointer to last Polygon hole [linked list]
Definition: gg_dxf.h:302
gaiaDxfPointPtr last_point
pointer to last DXF Point object [linked list]
Definition: gg_dxf.h:413
wrapper for DXF Text object
Definition: gg_dxf.h:163
int points
total count of points
Definition: gg_dxf.h:266
gaiaDxfHatchSegm * gaiaDxfHatchSegmPtr
Typedef for DXF Hatch Segment object.
Definition: gg_dxf.h:337
int is3Dpoint
boolean flag: contains 3d Point objects
Definition: gg_dxf.h:141
int is3Dtext
boolean flag: contains 3d Text objects
Definition: gg_dxf.h:139
int is3DinsText
boolean flag: contains 3d Insert Text objects
Definition: gg_dxf.h:500
GAIAGEO_DECLARE int gaiaDxfWriteEntities(gaiaDxfWriterPtr dxf)
Writing a DXF Entities Section Header.
gaiaDxfPolylinePtr last_polyg
pointer to last DXF Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:466
gaiaDxfHolePtr first_hole
pointer to first Polygon hole [linked list]
Definition: gg_dxf.h:300
int op_code
internal parser variable
Definition: gg_dxf.h:565
char * extra_key
internal parser variable
Definition: gg_dxf.h:627
gaiaDxfExtraAttrPtr last
pointer to last Extra Attribute [linked list]
Definition: gg_dxf.h:178
wrapper for DXF Circle object
Definition: gg_dxf.h:217
double scale_x
X scale factor.
Definition: gg_dxf.h:121
gaiaDxfInsertPtr first_ins_polyg
pointer to first DXF Insert Polyline (Polygon) object [linked list]
Definition: gg_dxf.h:484
double * z
array of Z coordinates
Definition: gg_dxf.h:272
int is_text
internal parser variable
Definition: gg_dxf.h:579
gaiaDxfWriter * gaiaDxfWriterPtr
Typedef for DXF Writer object.
Definition: gg_dxf.h:665
double z
Z coordinate.
Definition: gg_dxf.h:199
gaiaDxfExtraAttrPtr last
pointer to last Extra Attribute [linked list]
Definition: gg_dxf.h:306
gaiaDxfCircle curr_circle
internal parser variable
Definition: gg_dxf.h:617
int is3DinsPoint
boolean flag: contains 3d Insert Point objects
Definition: gg_dxf.h:502
int is3Dline
boolean flag: contains 3d Polyline (Linestring) objects
Definition: gg_dxf.h:431
wrapper for DXF Insert object
Definition: gg_dxf.h:110
gaiaDxfHatchPtr last_hatch
pointer to last DXF Hatch object [linked list]
Definition: gg_dxf.h:470
int is_circle
internal parser variable
Definition: gg_dxf.h:589
struct gaia_dxf_hole * next
pointer to next item [linked list]
Definition: gg_dxf.h:274
int section
internal parser variable
Definition: gg_dxf.h:567
double radius
radius
Definition: gg_dxf.h:226
char * layer_name
pointer to Layer Name string
Definition: gg_dxf.h:403
gaiaDxfInsertPtr first_ins_line
pointer to first DXF Insert Polyline (Linestring) object [linked list]
Definition: gg_dxf.h:480
FILE * out
IN: output DXF file handle.
Definition: gg_dxf.h:652
Container for OGC GEOMETRYCOLLECTION Geometry.
Definition: gg_structs.h:226
int hasHatch
boolean flag: contains Hatch objects
Definition: gg_dxf.h:137
wrapper for DXF Block object
Definition: gg_dxf.h:398
double x
X coordinate.
Definition: gg_dxf.h:195
gaiaDxfHatchPtr last_hatch
pointer to last DXF Hatch object [linked list]
Definition: gg_dxf.h:425
gaiaDxfBoundaryPath * gaiaDxfBoundaryPathPtr
Typedef for DXF Boundary Path object.
Definition: gg_dxf.h:356
gaiaDxfCircle * gaiaDxfCirclePtr
Typedef for DXF Circle object.
Definition: gg_dxf.h:233
struct gaia_dxf_insert gaiaDxfInsert
wrapper for DXF Insert object
double cz
Center Z coordinate.
Definition: gg_dxf.h:245
gaiaDxfPointPtr first_point
pointer to first DXF Point object [linked list]
Definition: gg_dxf.h:456
int is_layer
internal parser variable
Definition: gg_dxf.h:575
double cy
Center Y coordinate.
Definition: gg_dxf.h:243
double cx
Center X coordinate.
Definition: gg_dxf.h:241
int force_dims
IN: parser option - dimension handlig.
Definition: gg_dxf.h:549
struct gaia_dxf_layer gaiaDxfLayer
wrapper for DXF Layer object
int is3DinsLine
boolean flag: contains 3d Insert Polyline (Linestring) objects
Definition: gg_dxf.h:504