|
SpatiaLite
4.3.0
|
Geometry handling functions: DXF files. More...
Go to the source code of this file.
Data Structures | |
| struct | gaia_dxf_extra_attr |
| wrapper for DXF Extra Attribute object More... | |
| struct | gaia_dxf_insert |
| wrapper for DXF Insert object More... | |
| struct | gaia_dxf_text |
| wrapper for DXF Text object More... | |
| struct | gaia_dxf_point |
| wrapper for DXF Point object More... | |
| struct | gaia_dxf_circle |
| wrapper for DXF Circle object More... | |
| struct | gaia_dxf_arc |
| wrapper for DXF Arc object More... | |
| struct | gaia_dxf_hole |
| wrapper for DXF Polygon interior hole object More... | |
| struct | gaia_dxf_polyline |
| wrapper for DXF Polyline object could be a Linestring or a Polygon depending on the is_closed flag More... | |
| struct | gaia_dxf_hatch_segm |
| wrapper for DXF Pattern Segment object More... | |
| struct | gaia_dxf_boundary_path |
| wrapper for DXF Boundary Path object More... | |
| struct | gaia_dxf_hatch |
| wrapper for DXF Pattern Hatch object More... | |
| struct | gaia_dxf_block |
| wrapper for DXF Block object More... | |
| struct | gaia_dxf_layer |
| wrapper for DXF Layer object More... | |
| struct | gaia_dxf_parser |
| wrapper for DXF Parser object More... | |
| struct | gaia_dxf_write |
| wrapper for DXF Write object More... | |
Macros | |
| #define | GAIA_DXF_IMPORT_BY_LAYER 1 |
| import distinct layers | |
| #define | GAIA_DXF_IMPORT_MIXED 2 |
| import layers mixed altogether by type | |
| #define | GAIA_DXF_AUTO_2D_3D 3 |
| auto-selects 2D or 3D | |
| #define | GAIA_DXF_FORCE_2D 4 |
| always force 2D | |
| #define | GAIA_DXF_FORCE_3D 5 |
| always force 3D | |
| #define | GAIA_DXF_RING_NONE 6 |
| don't apply any special Ring handling | |
| #define | GAIA_DXF_RING_LINKED 7 |
| apply special "linked rings" handling | |
| #define | GAIA_DXF_RING_UNLINKED 8 |
| apply special "unlinked rings" handling | |
| #define | GAIA_DXF_V12 1000 |
| DXF version [Writer]. | |
Typedefs | |
| typedef struct gaia_dxf_extra_attr | gaiaDxfExtraAttr |
| wrapper for DXF Extra Attribute object | |
| typedef gaiaDxfExtraAttr * | gaiaDxfExtraAttrPtr |
| Typedef for DXF Extra Attribute object. More... | |
| typedef struct gaia_dxf_insert | gaiaDxfInsert |
| wrapper for DXF Insert object | |
| typedef gaiaDxfInsert * | gaiaDxfInsertPtr |
| Typedef for DXF Insert object. More... | |
| typedef struct gaia_dxf_text | gaiaDxfText |
| wrapper for DXF Text object | |
| typedef gaiaDxfText * | gaiaDxfTextPtr |
| Typedef for DXF Text object. More... | |
| typedef struct gaia_dxf_point | gaiaDxfPoint |
| wrapper for DXF Point object | |
| typedef gaiaDxfPoint * | gaiaDxfPointPtr |
| Typedef for DXF Point object. More... | |
| typedef struct gaia_dxf_circle | gaiaDxfCircle |
| wrapper for DXF Circle object | |
| typedef gaiaDxfCircle * | gaiaDxfCirclePtr |
| Typedef for DXF Circle object. More... | |
| typedef struct gaia_dxf_arc | gaiaDxfArc |
| wrapper for DXF Arc object | |
| typedef gaiaDxfArc * | gaiaDxfArcPtr |
| Typedef for DXF Arc object. More... | |
| typedef struct gaia_dxf_hole | gaiaDxfHole |
| wrapper for DXF Polygon interior hole object | |
| typedef gaiaDxfHole * | gaiaDxfHolePtr |
| Typedef for DXF Point object. More... | |
| typedef struct gaia_dxf_polyline | gaiaDxfPolyline |
| wrapper for DXF Polyline object could be a Linestring or a Polygon depending on the is_closed flag | |
| typedef gaiaDxfPolyline * | gaiaDxfPolylinePtr |
| Typedef for DXF Polyline object. More... | |
| typedef struct gaia_dxf_hatch_segm | gaiaDxfHatchSegm |
| wrapper for DXF Pattern Segment object | |
| typedef gaiaDxfHatchSegm * | gaiaDxfHatchSegmPtr |
| Typedef for DXF Hatch Segment object. More... | |
| typedef struct gaia_dxf_boundary_path | gaiaDxfBoundaryPath |
| wrapper for DXF Boundary Path object | |
| typedef gaiaDxfBoundaryPath * | gaiaDxfBoundaryPathPtr |
| Typedef for DXF Boundary Path object. More... | |
| typedef struct gaia_dxf_hatch | gaiaDxfHatch |
| wrapper for DXF Pattern Hatch object | |
| typedef gaiaDxfHatch * | gaiaDxfHatchPtr |
| Typedef for DXF Hatch object. More... | |
| typedef struct gaia_dxf_block | gaiaDxfBlock |
| wrapper for DXF Block object | |
| typedef gaiaDxfBlock * | gaiaDxfBlockPtr |
| Typedef for DXF Block object. More... | |
| typedef struct gaia_dxf_layer | gaiaDxfLayer |
| wrapper for DXF Layer object | |
| typedef gaiaDxfLayer * | gaiaDxfLayerPtr |
| Typedef for DXF Layer object. More... | |
| typedef struct gaia_dxf_parser | gaiaDxfParser |
| wrapper for DXF Parser object | |
| typedef gaiaDxfParser * | gaiaDxfParserPtr |
| Typedef for DXF Layer object. More... | |
| typedef struct gaia_dxf_write | gaiaDxfWriter |
| wrapper for DXF Write object | |
| typedef gaiaDxfWriter * | gaiaDxfWriterPtr |
| Typedef for DXF Writer object. | |
Functions | |
| GAIAGEO_DECLARE gaiaDxfParserPtr | gaiaCreateDxfParser (int srid, int force_dims, const char *prefix, const char *selected_layer, int special_rings) |
| Creates a DXF Parser object. More... | |
| GAIAGEO_DECLARE void | gaiaDestroyDxfParser (gaiaDxfParserPtr parser) |
| Destroying a DXF Parser object. More... | |
| GAIAGEO_DECLARE int | gaiaParseDxfFile (gaiaDxfParserPtr parser, const char *dxf_path) |
| Parsing a DXF file. More... | |
| GAIAGEO_DECLARE int | gaiaParseDxfFile_r (const void *p_cache, gaiaDxfParserPtr parser, const char *dxf_path) |
| Parsing a DXF file. More... | |
| 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. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriterInit (gaiaDxfWriterPtr dxf, FILE *out, int precision, int version) |
| Initializing a DXF Writer Object. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteHeader (gaiaDxfWriterPtr dxf, double minx, double miny, double minz, double maxx, double maxy, double maxz) |
| Writing the DXF Header. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteFooter (gaiaDxfWriterPtr dxf) |
| Writing a DXF Entities Section Header. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteTables (gaiaDxfWriterPtr dxf) |
| Writing the DXF Tables Section Header. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteLayer (gaiaDxfWriterPtr dxf, const char *layer_name) |
| Writing a DXF Table/Layer definition. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteEntities (gaiaDxfWriterPtr dxf) |
| Writing a DXF Entities Section Header. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteEndSection (gaiaDxfWriterPtr dxf) |
| Writing a DXF Entities Section Header. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWritePoint (gaiaDxfWriterPtr dxf, const char *layer_name, double x, double y, double z) |
| Writing a DXF Point Entity. More... | |
| 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. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteLine (gaiaDxfWriterPtr dxf, const char *layer_name, gaiaLinestringPtr line) |
| Writing a DXF Polyline (opened) Entity. More... | |
| GAIAGEO_DECLARE int | gaiaDxfWriteRing (gaiaDxfWriterPtr dxf, const char *layer_name, gaiaRingPtr ring) |
| Writing a DXF Polyline (closed) Entity. More... | |
| 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. More... | |
| 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. More... | |
Geometry handling functions: DXF files.
| typedef gaiaDxfArc* gaiaDxfArcPtr |
Typedef for DXF Arc object.
| typedef gaiaDxfBlock* gaiaDxfBlockPtr |
Typedef for DXF Block object.
Typedef for DXF Boundary Path object.
| typedef gaiaDxfCircle* gaiaDxfCirclePtr |
Typedef for DXF Circle object.
| typedef gaiaDxfExtraAttr* gaiaDxfExtraAttrPtr |
Typedef for DXF Extra Attribute object.
| typedef gaiaDxfHatch* gaiaDxfHatchPtr |
Typedef for DXF Hatch object.
| typedef gaiaDxfHatchSegm* gaiaDxfHatchSegmPtr |
Typedef for DXF Hatch Segment object.
| typedef gaiaDxfHole* gaiaDxfHolePtr |
Typedef for DXF Point object.
| typedef gaiaDxfInsert* gaiaDxfInsertPtr |
Typedef for DXF Insert object.
| typedef gaiaDxfLayer* gaiaDxfLayerPtr |
Typedef for DXF Layer object.
| typedef gaiaDxfParser* gaiaDxfParserPtr |
Typedef for DXF Layer object.
| typedef gaiaDxfPoint* gaiaDxfPointPtr |
Typedef for DXF Point object.
| typedef gaiaDxfPolyline* gaiaDxfPolylinePtr |
Typedef for DXF Polyline object.
| typedef gaiaDxfText* gaiaDxfTextPtr |
Typedef for DXF Text object.
| GAIAGEO_DECLARE gaiaDxfParserPtr gaiaCreateDxfParser | ( | int | srid, |
| int | force_dims, | ||
| const char * | prefix, | ||
| const char * | selected_layer, | ||
| int | special_rings | ||
| ) |
Creates a DXF Parser object.
| srid | the SRID value to be used for all Geometries |
| force_dims | should be one of GAIA_DXF_AUTO_2D_3D, GAIA_DXF_FORCE_2D or GAIA_DXF_FORCE_3D |
| prefix | an optional prefix to be used for DB target tables (could be NULL) |
| selected_layers | if set, only the DXF Layer of corresponding name will be imported (could be NULL) |
| special_rings | rings handling: should be one of GAIA_DXF_RING_NONE, GAIA_DXF_RING_LINKED of GAIA_DXF_RING_UNLINKED |
| GAIAGEO_DECLARE void gaiaDestroyDxfParser | ( | gaiaDxfParserPtr | parser | ) |
Destroying a DXF Parser object.
| parser | pointer to DXF Parser object |
| GAIAGEO_DECLARE int gaiaDxfWriteEndSection | ( | gaiaDxfWriterPtr | dxf | ) |
Writing a DXF Entities Section Header.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| GAIAGEO_DECLARE int gaiaDxfWriteEntities | ( | gaiaDxfWriterPtr | dxf | ) |
Writing a DXF Entities Section Header.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| GAIAGEO_DECLARE int gaiaDxfWriteFooter | ( | gaiaDxfWriterPtr | dxf | ) |
Writing a DXF Entities Section Header.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| 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.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the corresponding layer |
| line | pointer to the internal Ring to be exported into the DXF |
| label | text string containing the label value (could be NULL) |
| text_height | only for Text Labels: ingnored in any other case. |
| text_rotation | only for Text Labels: ingnored in any other case. |
| GAIAGEO_DECLARE int gaiaDxfWriteHeader | ( | gaiaDxfWriterPtr | dxf, |
| double | minx, | ||
| double | miny, | ||
| double | minz, | ||
| double | maxx, | ||
| double | maxy, | ||
| double | maxz | ||
| ) |
Writing the DXF Header.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| minx | the minimum X coordinate contained within the DXF |
| minx | the minimum Y coordinate contained within the DXF |
| minx | the minimum Z coordinate contained within the DXF |
| minx | the maximum X coordinate contained within the DXF |
| minx | the maximum Y coordinate contained within the DXF |
| minx | the maximum Z coordinate contained within the DXF |
| GAIAGEO_DECLARE int gaiaDxfWriteLayer | ( | gaiaDxfWriterPtr | dxf, |
| const char * | layer_name | ||
| ) |
Writing a DXF Table/Layer definition.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the layer |
| GAIAGEO_DECLARE int gaiaDxfWriteLine | ( | gaiaDxfWriterPtr | dxf, |
| const char * | layer_name, | ||
| gaiaLinestringPtr | line | ||
| ) |
Writing a DXF Polyline (opened) Entity.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the corresponding layer |
| line | pointer to the internal Linestring to be exported into the DXF |
| GAIAGEO_DECLARE int gaiaDxfWritePoint | ( | gaiaDxfWriterPtr | dxf, |
| const char * | layer_name, | ||
| double | x, | ||
| double | y, | ||
| double | z | ||
| ) |
Writing a DXF Point Entity.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the corresponding layer |
| x | X coordinate value |
| y | Y coordinate value |
| z | Z coordinate value |
| GAIAGEO_DECLARE int gaiaDxfWriteRing | ( | gaiaDxfWriterPtr | dxf, |
| const char * | layer_name, | ||
| gaiaRingPtr | ring | ||
| ) |
Writing a DXF Polyline (closed) Entity.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the corresponding layer |
| line | pointer to the internal Ring to be exported into the DXF |
| GAIAGEO_DECLARE int gaiaDxfWriterInit | ( | gaiaDxfWriterPtr | dxf, |
| FILE * | out, | ||
| int | precision, | ||
| int | version | ||
| ) |
Initializing a DXF Writer Object.
| writer | pointer to the gaiaDxfWriter object to be initialized |
| out | file handle to DXF output file |
| precision | number of decimal digits for any coordinate |
| version | currently always expected to be GAIA_DXF_V12 |
| GAIAGEO_DECLARE int gaiaDxfWriteTables | ( | gaiaDxfWriterPtr | dxf | ) |
Writing the DXF Tables Section Header.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| 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.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| layer_name | name of the corresponding layer |
| x | X coordinate value |
| y | Y coordinate value |
| z | Z coordinate value |
| label | text string containing the label value |
| text_height | height of the text in map units |
| angle | text rotation angle |
| 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.
| dxf | pointer to a properly initialized gaiaDxfWriter object |
| db_hanlde | handle to the current DB connection |
| sql | a text string defining the SQL query to be used for extracting all geometries/entities to be exported into the output DXF |
| layer_col_name | name of the SQL resultset column containing the Layer name |
| geom_col_name | name of the SQL resultset column containing Geometries |
| label_col_name | name of the SQL resultset column containing Label values (could be NULL) |
| text_height_col_name | name of the SQL resultset column containing Text Height values (could be NULL) |
| text_rotation_col_name | name of the SQL resultset column containing Text Rotation values (could be NULL) |
| geom_filter | an optional arbitrary Geometry to be used as a Spatial Filter (could be NULL) |
| 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.
| db_handle | handle to a valid DB connection |
| parser | pointer to DXF Parser object |
| mode | should be one of GAIA_DXF_IMPORT_BY_LAYER or GAIA_DXF_IMPORT_MIXED |
| append | boolean flag: if set and some required DB table already exists will attempt to append further rows into the existing table. otherwise an error will be returned. |
| GAIAGEO_DECLARE int gaiaParseDxfFile | ( | gaiaDxfParserPtr | parser, |
| const char * | dxf_path | ||
| ) |
Parsing a DXF file.
| parser | pointer to DXF Parser object |
| dxf_path | pathname of the DXF external file to be parsed |
| GAIAGEO_DECLARE int gaiaParseDxfFile_r | ( | const void * | p_cache, |
| gaiaDxfParserPtr | parser, | ||
| const char * | dxf_path | ||
| ) |
Parsing a DXF file.
| p_cache | a memory pointer returned by spatialite_alloc_connection() |
| parser | pointer to DXF Parser object |
| dxf_path | pathname of the DXF external file to be parsed |
1.8.9.1