Hi Adam,
 
Thank you so much for your detailed response!  I'm excited to give this a try.
If I encounter any questions or run into any issues during the process, I would reach out to you for further guidance? Your expertise would be invaluable.
 
05.09.2023, 10:09, "Adam Jamison" <adam.jami...@portbris.com.au>:

Shahrukh,

 

I use MicroStation daily and have a licensed product so this would only work if you have it installed.

 

Depending on your Bentley MicroStation version I’ve had some success writing C# addin for the software to interpret Bentley elements and output geojson.
 

In the latest version (v10.17.02.61) you could do some trickery using the new “Item Types”, I haven’t made one for geojson direct however I’ve had success exporting an excel spreadsheet then using GDAL to convert this to geojson.
 

I’ve tested this with simple linestring and simple shape elements with upto 100 vertices (there’s currently no way of looping every vertex).

 

  1. Create an Item Type for LineStrings call it WKT_LINE and create another one for Shape WKT_SHAPE or something that makes sense to you.
  2. Add a property call it WKT or whatever you would like the geometry column to be called.
  3. Set the following:
    1. Property Definition

                                                               i.      Type: Text

                                                             ii.      Is Array: False

                                                           iii.      Is ReadOnly: True

                                                           iv.      Visibility: Show

    1. Calculated Property

                                                               i.      _expression_ SEE BELOW

                                                             ii.      Use last valid value: False

                                                           iii.      Failure Value: ERROR GENERATING LINESTRING

  1. Attach this item to required elements.
    1. WKT_LINE can be appended to simple linestring elements
    2. WKT_SHAPE can be appended to simple shape elements
  2. Use MicroStation Export Item Types to export a spreadsheet
  3. Use GDAL to convert spreadsheet to geojson or anything you want

 

_expression_ for LineString use first line below then repeat second line as many times as you like, increment the number each time, 1 becomes 2, 2 becomes 3 etc etc…. (Eventually would impact performance I guess), end with the last line.

 

"LINESTRING (" & IIF(this.GetElement().Count > 0, this.GetElement().Segments[0].Start.X & " " & this.GetElement().Segments[0].Start.Y,"")

& IIF(this.GetElement().Count > 1, ", " & this.GetElement().Segments[1].Start.X & " " & this.GetElement().Segments[1].Start.Y,"")

& ", " & this.GetElement().Segments[this.GetElement().Count-1].End.X & " " & this.GetElement().Segments[this.GetElement().Count-1].End.Y &")"

 

_expression_ for Shape / Polygon use first line below then repeat second line as many times as you like, increment the number each time, 1 becomes 2, 2 becomes 3 etc etc…. (Eventually would impact performance I guess), end with the last line.

 

"POLYGON ((" & IIF(this.GetElement().Count > 0, this.GetElement().Segments[0].Start.X & " " & this.GetElement().Segments[0].Start.Y,"")

& IIF(this.GetElement().Count> 1, ", " & this.GetElement().Segments[1].Start.X & " " & this.GetElement().Segments[1].Start.Y,"")

& ", " & IIF(this.GetElement().Count>0,this.GetElement().Segments[0].Start.X & " " & this.GetElement().Segments[0].Start.Y,"") & "))"

 

Cheers

Adam

 

From: gdal-dev <gdal-dev-boun...@lists.osgeo.org> On Behalf Of Shahrukh Mirza Nawandish
Sent: Tuesday, September 5, 2023 3:11 PM
To: gdal-dev@lists.osgeo.org
Subject: [gdal-dev] : Inquiry about Converting MicroStation V8 DGN to GeoJSON or Alternative Formats

 

 

Dear GDAL Support Team,

 

Is there a cost-effective or open-source solution for converting MicroStation V8 DGN files to GeoJSON or other formats, as the Open Teigha SDK comes with a cost.

Any suggestions or guidance would be appreciated.

-- 

Saygılarımla / Kind Regards

 

Shahrukh Mirza NAWANDISH

Havacılık Bilgi Sistemleri / Aeronautical Information Systems

Yazılım Geliştirme Uzm. Yrd. / Software Development Assist. Specialist

Bilgisayar Programcısı / Computer Programmer MCA

T:+90 312 266 66 98

M:+90 538 519 72 67

E:mirza.nawand...@haritaevi.com

: Ankara-Istanbul-Bucharest

www.haritaevi.com

www.obstacleanalyze.com

www.aerodatamarket.com

 

 


Note:
This message is for the named person's use only.  It may contain confidential, proprietary or legally privileged information.  No confidentiality or privilege is waived or lost by any mistransmission.  If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.  You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The Port of Brisbane  reserves the right to monitor all e-mail communications through its networks.
If you have received this transmission in error please let us know by contacting us on +61 7 3258 4888 or by reply E-Mail to the sender.
Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of any such entity.
 
Thank You.
 
 
-- 
Saygılarımla / Kind Regards
 
Shahrukh Mirza NAWANDISH
Havacılık Bilgi Sistemleri / Aeronautical Information Systems
Yazılım Geliştirme Uzm. Yrd. / Software Development Assist. Specialist
Bilgisayar Programcısı / Computer Programmer
T:+90 312 266 66 98
M:+90 538 519 72 67
www.haritaevi.comwww.obstacleanalyze.comwww.aerodatamarket.com
 
 
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to