Opened 14 years ago

Closed 6 years ago

#1387 closed defect (wontfix)

Problems with MSLINK attributes

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: unspecified
Severity: normal Keywords:
Cc:

Description (last modified by Jukka Rahkonen)

Hi Frank,
 
 
Yesterday i was working on MAPSERVER, DGN file linked with ORACLE and i found a nice bug in dgnlib
 
DGN file are linked with ORACLE via an attribute called MSLINK
 
DGNLIB read perfectly all the mslink for all object EXCEPT for line composed with 2 points (line with more than 2 points are ok)
 
I have made a lot of sreens to illustrate the problem (1 with ArcGIS 9,1 with ArcView3 , 2 with my tool) and i send u too the dgn file 
 
I hope it will help you too fix the pb
 
Thx
Albin from FRANCE

...

Albin,

I see what you mean!

I have examined the file with dgndump (and a hex editor) and here
is what I get with dgndump for one of the problem features:

Element:Line String  Level: 3 id:19
  offset=13546  size=86 bytes
  graphic_group:0   color:3 weight:0 style:0
  properties=3584,ATTRIBUTES,MODIFIED,NEW
  (659669.623000,216455.503000,0.000000)
  (659668.908000,216403.743000,0.000000)
Attributes (32 bytes):
Type=0x51a9, EntityNum=30284, MSLink=-965607040
  0x0710a95104004c76800172c6791f4c05
Type=0x6091, EntityNum=33, MSLink=2405
  0x07109160810f21006509000000000000

And for one of the "good" features:

Element:Line String  Level: 3 id:231
  offset=31500  size=102 bytes
  graphic_group:0   color:3 weight:0 style:0
  properties=3584,ATTRIBUTES,MODIFIED,NEW
  (659669.489000,216455.466000,0.000000)
  (659646.552000,216467.873000,0.000000)
  (659624.602000,216463.187000,0.000000)
Attributes (40 bytes):
Type=0x6091, EntityNum=33, MSLink=2404
  0x07109160810f21006409000000000000
Type=0x51a9
  0x0b10a951060012acc42b0defe03d30174b061df300000000

Note that both features have two things in the
attribute data.  OGR picks the first MSLink attribute
of the underlying dgn element to display as the MSLink
attribute of the OGR feature.  So it seems that the 2pt
element does have a correct link, it just happens to
be the second attribute, not the first.

At this point I'm not really sure if there is a
systematic issue with 2pt elements, or if that is more
of a coincidence.  I investigated the "bytes of attribute
data", and "offset to attribute data" and it *seems* that
the correct values are being used.  I don't know how
other applications decide which attribute to show as the
MSLink.  Perhaps they "know" which EntityNum they are
looking for?

Would you mind if I file this as a proper bugzilla bug
report, and attach frank.dgn to it?  Frank.dgn would
then be publically visible which is why I am asking
first.

Unfortunately, this doesn't seem to be a trivial bug to
fix.

Best regards,

Frank

....

Hi Frank,


You can report this bug to BugZilla and attach Franck.dgn.

Here is some fresh news :

We work on the dgn file with EDG (a Bentley tool for analyse dgn file)

And here is the result

In DGN file , users can use Ehanced precison to draw more accurate data

This option add an attribute called User Data Linkage for each object

For the 2 points Line, Oracle Linkage is in first position and User Data Linkage in second -> BAD MSLINK
For the 3 points Line, User Data Linkage is in first position and Oracle Linkage in second - GOOD MSLINK

We remove the Ehanced precison and re analyse the file and there is no more User Data Linkage in attribute -> GOOD MSLINK

We can resume the situation like this

2 POINTS LINE WITH ENHANCED PRECISON ------------------------> BAD MSLINK
2 POINTS LINE WITHOUT ENHANCED PRECISON -------------------> GOOD MSLINK
MORE THAN 2 POINTS LINE WITH ENHANCED PRECISON ---------> GOOD MSLINK
MORE THAN 2 POINTS LINE WITHOUT ENHANCED PRECISON ----> GOOD MSLINK

With enhanced precision , like you said the attribute are not always in the same order !!!!!!

You will find in this mail an another dgn file (same dgn but without enhanced precision)

You can attach all the dgn file to the bugzilla report



Best regards,

Albin from FRANCE



Good luck i hope it will help you






here is the the complete log from EDG

With Ehanced precison

    40    (4)  Line STRING                  Level = 3
             Words to follow = 49,  Block,Word = 32, 241; byte = 16352
             Range: low  = 659624602, 216455466
                    high = 659669489, 216463187
             Graphic group = 0
             Index to attributes = 15
             Properties: nohole, snappable, planar, noview_ind, attributes,
                          modified, new_element, nolocked
                Class = 0 (Primary)
             Symbology: color = 3, weight = 0, style = 0 (Solid)
                Vertices = 3
                    659669489, 216455466
                    659642447, 216461671
                    659624602, 216463187
             Attributes:
                Oracle Linkage (24721): wtf = 7, class = 0, props = ---U
                   entity = 33, mslink key = 2404, disp = 0
                    0000
                User Data Linkage:
                   user ID = 20905, wtf = 11, class = 0, props = ---U
                    0006  639a  2bc4  ef0d  0c36
                    21be  064b  f31d  0000  0000

    21    (4)  Line STRING                  Level = 3
             Words to follow = 41,  Block,Word = 27, 157; byte = 13624
             Range: low  = 659668908, 216403743
                    high = 659669623, 216455503
             Graphic group = 0
             Index to attributes = 11
             Properties: nohole, snappable, planar, noview_ind, attributes,
                          modified, new_element, nolocked
                Class = 0 (Primary)
             Symbology: color = 3, weight = 0, style = 0 (Solid)
                Vertices = 2
                    659669623, 216455503
                    659668908, 216403743
             Attributes:
                User Data Linkage:
                   user ID = 20905, wtf = 7, class = 0, props = ---U
                    0004  764c  0180  c672  1f79
                    054c
                Oracle Linkage (24721): wtf = 7, class = 0, props = ---U
                   entity = 33, mslink key = 2405, disp = 0
                    0000



Without Ehanced Precision

    38    (4)  Line STRING                  Level = 3
             Words to follow = 33,  Block,Word = 32, 155; byte = 16180
             Range: low  = 659668908, 216403743
                    high = 659669623, 216455503
             Graphic group = 0
             Index to attributes = 11
             Properties: nohole, snappable, planar, noview_ind, attributes,
                          modified, new_element, nolocked
                Class = 0 (Primary)
             Symbology: color = 3, weight = 0, style = 0 (Solid)
                Vertices = 2
                    659669623, 216455503
                    659668908, 216403743
             Attributes:
                Oracle Linkage (24721): wtf = 7, class = 0, props = ---U
                   entity = 33, mslink key = 2405, disp = 0
                    0000


    40    (4)  Line STRING                  Level = 3
             Words to follow = 37,  Block,Word = 32, 225; byte = 16320
             Range: low  = 659624602, 216455466
                    high = 659669489, 216463187
             Graphic group = 0
             Index to attributes = 15
             Properties: nohole, snappable, planar, noview_ind, attributes,
                          modified, new_element, nolocked
                Class = 0 (Primary)
             Symbology: color = 3, weight = 0, style = 0 (Solid)
                Vertices = 3
                    659669489, 216455466
                    659642447, 216461671
                    659624602, 216463187
             Attributes:
                Oracle Linkage (24721): wtf = 7, class = 0, props = ---U
                   entity = 33, mslink key = 2404, disp = 0
                    0000

Attachments (2)

frank.dgn (31.0 KB) - added by warmerdam 14 years ago.
First problem dgn file.
franck_without_enhanced_precision.dgn (16.5 KB) - added by warmerdam 14 years ago.
Second dgn file (without precision)

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by warmerdam

Attachment: frank.dgn added

First problem dgn file.

Changed 14 years ago by warmerdam

Second dgn file (without precision)

comment:1 Changed 6 years ago by Jukka Rahkonen

Description: modified (diff)
Resolution: wontfix
Status: newclosed

I think that MicroStation? data in Oracle or other databases through the MSLINK system has never been officially supported by GDAL. GDAL does not even support the DGN v8 format which was introduced in year 2000 because the format specification is not open. It is hard to believe that this ticket will ever be fixed, especially because is seems that Bentley Geospatial Server V8i is using data from standard Oracle tables which can be accessed through OCI driver.

Note: See TracTickets for help on using tickets.