Opened 14 years ago
Closed 13 years ago
#3496 closed enhancement (worksforme)
DXF does not consider attributes like 'elevation', 'thickness' and 'color'
Reported by: | zanollim | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | 1.8.0 |
Severity: | normal | Keywords: | DXF, ELEVATION |
Cc: |
Description
When I import a DXF in Postgis I need to store all the informations about the features, including, for example, the 'elevation' and the 'thickness' of a contour line. Is it possible to store these informations as attributes of the layer (like gvSIG)?
Change History (4)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Milestone: | → 1.7.3 |
---|
comment:3 by , 13 years ago
Keywords: | DXF ELEVATION added |
---|---|
Version: | unspecified → 1.8.0 |
Same here. ogr2ogr does not import elevation value. Example DXF file: http://ubuntuone.com/p/13aY/
comment:4 by , 13 years ago
Component: | default → OGR_SF |
---|---|
Milestone: | 1.8.1 |
Resolution: | → worksforme |
Status: | new → closed |
I have examined the file provided by jgrocha and the Z values are being properly included in the geometries - at least for the first feature.
OGRFeature(entities):0 Layer (String) = CURVA_NÍVEL_SECUNDÁRIA SubClasses (String) = (null) ExtendedEntity (String) = (null) Linetype (String) = (null) EntityHandle (String) = 1FD05 Text (String) = (null) Style = PEN(c:#0000ff) LINESTRING (294834.1028 3635647.5195 526,294834.0703 3635647.0391000011 526,29 4833.9998 3635646.9277 526,294833.8549 3635647.2515 526,294833.5574 3635647.5195 526)
Note that the Z coordinate is 526 for each vertex.
To the extent that styling information like line thickness is captured, it will be represented in the feature style string on the feature. By default style strings are not transferred to PostGIS, but they can be explicitly requested (as pseudo-field ogr_style) in an OGR SQL statement.
eg.
ogr2ogr -update PG:dbname=warmerda -nln mydxf abc.dxf -sql 'select *,ogr_style from entities'
I don't currently see any obvious outstanding issue with the DXF driver so I'm closing this ticket. Please reopen if there is a bug.
See the similar ticket in QGIS trac:
#2195