Skip to main content
Question

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


khaphan

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

caracadrian
Contributor
Forum|alt.badge.img+23
  • Contributor
  • July 18, 2021

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.


khaphan
  • Author
  • July 18, 2021
caracadrian wrote:

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.


kailinatsafe
Safer
Forum|alt.badge.img+21

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


khaphan
  • Author
  • July 20, 2021
kailinatsafe wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings