Question

How to convert multiple dgn file to multiple shapefile by FME?

  • 18 July 2021
  • 4 replies
  • 14 views

Hello everybody, 

My project need to convert amount dgn files (more than 2000 files) to shapefile and I want the output also are multiple shapefile which equal dgn files. I'm a newbie in FME, so who know the exactly way to convert multiple dgn files let's support me. Thanks for everyone!Capture


4 replies

Badge +20

The first thing to consider is that shape files are geometry dependent. Points go to a points shape file, line to a line shape, etc. DGN in not.

For that many files I would use Directory and File Pathnames reader with a Path Filter set to *.dgn followed by (a Tester first with path_filename CONTAINS -V8 followed by) FeatureReader configured as Bentley Microstation V-what_version_the_files_are, Dataset set to path_windows attribute and Attribute Accumulation set to Merge Initiator and Result.

Send that to a GeometryFilter for Point, Line, Area, Text, Whatever_else_you_need.

Each output goes to a shape writer set as follows: Shape Name = @Value(path_rootname)-{[geometry_type]}. (You fill in the geometry_type by hand, point, line, etc)

That mostly covers the translation. You may have some trouble with the schema and you may have to configure it as Dynamic if you want to bring other attributes from the DGN files.

Have a go at it and if you have any problems just come back to the community.

The first thing to consider is that shape files are geometry dependent. Points go to a points shape file, line to a line shape, etc. DGN in not.

For that many files I would use Directory and File Pathnames reader with a Path Filter set to *.dgn followed by (a Tester first with path_filename CONTAINS -V8 followed by) FeatureReader configured as Bentley Microstation V-what_version_the_files_are, Dataset set to path_windows attribute and Attribute Accumulation set to Merge Initiator and Result.

Send that to a GeometryFilter for Point, Line, Area, Text, Whatever_else_you_need.

Each output goes to a shape writer set as follows: Shape Name = @Value(path_rootname)-{[geometry_type]}. (You fill in the geometry_type by hand, point, line, etc)

That mostly covers the translation. You may have some trouble with the schema and you may have to configure it as Dynamic if you want to bring other attributes from the DGN files.

Have a go at it and if you have any problems just come back to the community.

Thank for your support! I just want convert line feature of dgn to shapefile. I try with FME but the output file which merge 2000 files to 1 file.

Userlevel 3
Badge +13

Have you considered using a fanout expression in your SHP writer?

Have you considered using a fanout expression in your SHP writer?

No, I have not yet tried this function! I' m reading the guide which your link. Thank you so much!Fanout Dataset

Reply