#2035 closed defect (fixed)
Using OGR writing DGN files
Reported by: | bjorn | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.5 |
Component: | OGR_SF | Version: | unspecified |
Severity: | normal | Keywords: | dgn |
Cc: |
Description (last modified by )
When we use OGR to write back data to DGN files, then the "colorindex" field is reset (to 0 for our data). Looking at the code it seems that it is set to the value of nGraphicGroup. Is this correct ? The fields "MSLink" and "EntityNum" is read, but not written back ?
/* -------------------------------------------------------------------- */ /* Add other attributes. */ /* -------------------------------------------------------------------- */ int nLevel = poFeature->GetFieldAsInteger( "Level" ); int nGraphicGroup = poFeature->GetFieldAsInteger( "GraphicGroup" ); int nColor = poFeature->GetFieldAsInteger( "ColorIndex" ); int nWeight = poFeature->GetFieldAsInteger( "Weight" ); int nStyle = poFeature->GetFieldAsInteger( "Style" ); nLevel = MAX(0,MIN(63,nLevel)); nColor = MAX(0,MIN(255,nGraphicGroup)); nWeight = MAX(0,MIN(31,nWeight)); nStyle = MAX(0,MIN(7,nStyle)); DGNUpdateElemCore( hDGN, papsGroup[0], nLevel, nGraphicGroup, nColor, nWeight, nStyle );
Could anybody adwise ...
Change History (3)
comment:1 by , 16 years ago
Component: | default → OGR_SF |
---|---|
Description: | modified (diff) |
Keywords: | dgn added |
comment:2 by , 16 years ago
Milestone: | → 1.4.5 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:3 by , 16 years ago
It turns out the ogr_dgn.py test script was expecting wrong results for this case and now has been updated to expect right results (r13151).
Note:
See TracTickets
for help on using tickets.
Problem confirmed. It is a typo in the code and I have corrected it in trunk (r13147) and 1.4 branch (r13148).