#3241 closed defect (wontfix)
DGN MSLINKS (Oracle Linkage)
Reported by: | nobilis | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | major | Keywords: | |
Cc: |
Description
ogr2ogr only output's one EntityNum and MSLINK value. When dgn has oracle connection, this linkage is written mostly as a second MSLINK value. Sometimes even as third.
When conveerting with FME, all linkages are present. But FME is too costly for this task.
I've added a test dgn file with three polylines. These have mslink values: 1053977 1158798 1158799 EntityNum is 15 for all three.
Talking to Frank Warmerdam he said he would potentially be willing to modify the driver to make this "run time configurable" (whether to return multiple links as a list type variable).
I would really appreciate.
Attachments (1)
Change History (14)
by , 14 years ago
Attachment: | testdata.dgn added |
---|
comment:1 by , 14 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Re-opening. I didn't see the attachment. Closing #3239 instead
comment:3 by , 9 years ago
Priority: | high → normal |
---|
All those tickets have more than one year and nobody has acted on it, so the priority is not so high
comment:5 by , 8 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
Closing the ticket as won't fix because MicroStation dgn, MSLINKs and Oracle is in an unmaintained combination. Fortunately there can't be many users either.
comment:6 by , 8 years ago
Hi! Its very important to see multiple mslinks in ogr. I'm trying read a dgn using ogr from python, and, I can see only one. In ogrinfo:
OGRFeature(elements):304487
Type (Integer) = 3 Level (Integer) = 3 GraphicGroup (Integer) = 0 ColorIndex (Integer) = 0 Weight (Integer) = 0 Style (Integer) = 0 EntityNum (Integer) = 20497 MSLink (Integer) = 865795648 Text (String) = (null) Style = PEN(id:"ogr-pen-0",c:#ffffff) LINESTRING (5430278.11 6359963.47,5430086.13 6359908.19)
In dgndump: Element:Line String Level:25 id:170872
offset=13044876 size=110 bytes graphic_group:0 color:3 weight:0 style:0 properties=2560,ATTRIBUTES,NEW (5440229.910000,6353210.940000,0.000000) (5440203.800000,6353083.430000,0.000000)
Attributes (56 bytes): Type=0x51a9
0x1310a9510e006b840000000000000000000000000000000000000000000000000000000000000000
Type=0x5e62, EntityNum=37, MSLink=1709
0x0710625e810f2500ad06000000000000
Any plan to add this feature?
comment:7 by , 8 years ago
I did put a incorrect example. The values from ogrinfo and dgndump, for the same element, are:
OGRFeature(elements):304487
Type (Integer) = 3 Level (Integer) = 3 GraphicGroup (Integer) = 0 ColorIndex (Integer) = 0 Weight (Integer) = 0 Style (Integer) = 0 EntityNum (Integer) = 20497 MSLink (Integer) = 865795648 Text (String) = (null) Style = PEN(id:"ogr-pen-0",c:#ffffff) LINESTRING (5430278.11 6359963.47,5430086.13 6359908.19)
Element:Line Level: 3 id:304487
offset=27839844 size=84 bytes graphic_group:0 color:0 weight:0 style:0 properties=3584,ATTRIBUTES,MODIFIED,NEW (5430278.110000,6359963.470000,0.000000) (5430086.130000,6359908.190000,0.000000) Attributes (32 bytes): Type=0x51a9, EntityNum=20497, MSLink=865795648 0x0710a9510400115040fe9a335b2f0e1c Type=0x5e62, EntityNum=4, MSLink=24400 <-- Second mslink 0x0710625e810f0400505f000000000000
I did check sources from dgnlib and ogr, and I see very similar code (the dgnlib code is included in ogr).
comment:8 by , 8 years ago
Ok, I did this change in ogrdgnlayer.cpp:
before: pszLinkFormat = (char *) CPLGetConfigOption( "DGN_LINK_FORMAT", "FIRST" );
now: pszLinkFormat = (char *) CPLGetConfigOption( "DGN_LINK_FORMAT", "LIST" );
Then, now, I can see all mslinks in ogrinfo, and in my python code:
OGRFeature(elements):304487 Type (Integer) = 3 Level (Integer) = 3 GraphicGroup (Integer) = 0 ColorIndex (Integer) = 0 Weight (Integer) = 0 Style (Integer) = 0 EntityNum (IntegerList) = (2:20497,4) MSLink (IntegerList) = (2:865795648,24400) Text (String) = (null) Style = PEN(id:"ogr-pen-0",c:#ffffff) LINESTRING (5430278.11 6359963.47,5430086.13 6359908.19)
Is it ok this change?
comment:9 by , 8 years ago
You could as well not touch the code but specify the configuration option / environment variable externally. But perhaps the new default make sense. Anyway improving the documentation page would be appreciated.
comment:10 by , 8 years ago
Very well, I have no problems in realizing the patch of the correct mode. Do you suggest any protocol for the nomenclature of the variable of environment, of such a way of harmonizing with the rest of the application? I would be interested that this "correction" will be included in the next ogr's builds. I imagine that the values "FIRST" and "LIST" jurisdiction put opportunely by some developer, with the idea in mind of providing this functionality. Then, in the code, it would be enough with incluír a getenv to obtain the configuration option.
comment:11 by , 8 years ago
There is no code to change. You just have to set the DGN_LINK_FORMAT environment variable to "LIST". See https://trac.osgeo.org/gdal/wiki/ConfigOptions
comment:12 by , 8 years ago
Thanks for the explanation. Sorry, I did not understand. My English is "poor". I asked my boss to help me, and explained clearly what you had written me. He understood according to you I would like you to complete the documentation. If so, please instruct me how I do it, and willingly, I will. I think that free software is done with the help of all, however small. Also, I think it would be useful to set the default to showing all mslinks. this helps a lot to ease migration and co-existence with a spatial database. Well, I hope instructions, if you like. I am lucky that my job letting me use (and therefore work) in free software technologies, and therefore I offer to help you.
comment:13 by , 8 years ago
The documentation of the DGN driver is in this HTML page : https://svn.osgeo.org/gdal/trunk/gdal/ogr/ogrsf_frmts/dgn/drv_dgn.html . You can either attach a modified version to this ticket (or a patch if you checkout the code from SVN)
Duplicate of #3239