Skip to main content

Hi,

I want to convert microstation v7 design file to shape file using FME. I have feature in levels, there are two features in level 7 have different styles. I want to extract them in two different shape file. One feature is in lv=7, style=0, wt=1 and color=0 and another feature in lv=7, style=2, weight=2 and color = 1.

I want first one with style= 0 to stream_dry and another one style=2 to stream_perennial.

Is it possible to convert both to single shape that is stream and they can be differentiate in their attribute of Type=dry/perennial.

Please help me.

Thanks Sachin

Hi,

Yes, it is possible but your question is but confusing.

Whether you want the features in 1 shape with different attributes or 2 shape files?


How I would approach this is:

Create an XLS file with the possible options for level, weight, style etc and add a column with SHAPE file name.

Use a Joiner or FeatureMerger to add the SHAPE name attribute to the objects joining on the styling attributes.

The you can either use an AttributeFilter on the SHAPE attribute or a Fanout on the Writer Feature type to write different Shape files. This way you can add a different output by adding a line to the XLS file.

Hope this makes sense.


Hi,

Yes, it is possible but your question is but confusing.

Whether you want the features in 1 shape with different attributes or 2 shape files?

Yes sir, I want the both feature in one shape file with different attribute based on their level weight style and color.

Thanks

Help me


How I would approach this is:

Create an XLS file with the possible options for level, weight, style etc and add a column with SHAPE file name.

Use a Joiner or FeatureMerger to add the SHAPE name attribute to the objects joining on the styling attributes.

The you can either use an AttributeFilter on the SHAPE attribute or a Fanout on the Writer Feature type to write different Shape files. This way you can add a different output by adding a line to the XLS file.

Hope this makes sense.

Thanks, I am new to this. Can't understand how to do.


Hi @chowdharysachin

I agree with @erik_jan - you can create an Excel file or a CSV file with all possible level/style/color/etc. combinations and their corresponding destination attribute values. This file then can be used to find destination attribute value for each feature by matching the feature level/style/color with one of the rows in the file and retrieving the destination attribute value from the row. This approach will give you a lot of flexibility - it will be very easy to add new rows or alter already existing rows.

You can also use AttributeCreator to create the new destination attribute. Please take a look at the attached workspace and AttributeCreator with Conditional Value in it. It is the same idea as suggested by @erik_jan but without an external file. streams.fmw


Yes sir, I want the both feature in one shape file with different attribute based on their level weight style and color.

Thanks

Help me

Hi,

1. Add DGN reader

2. Add AttributeExposer with style attribute exposed (i.e. igds_style or igds_custom_linestyle)

3. Connect to shp writer

4. Connect the requried attributes

Pratap


Hi @chowdharysachin

I agree with @erik_jan - you can create an Excel file or a CSV file with all possible level/style/color/etc. combinations and their corresponding destination attribute values. This file then can be used to find destination attribute value for each feature by matching the feature level/style/color with one of the rows in the file and retrieving the destination attribute value from the row. This approach will give you a lot of flexibility - it will be very easy to add new rows or alter already existing rows.

You can also use AttributeCreator to create the new destination attribute. Please take a look at the attached workspace and AttributeCreator with Conditional Value in it. It is the same idea as suggested by @erik_jan but without an external file. streams.fmw

BTW this particularly problem is the VERY problem, down to the formats, that FME was originally invented to solve. So @chowdharysachin do let us know if you're still stuck!


Hi @chowdharysachin,

You need to expose the format attribute IGDS_style and use a tester or attribute filter to seperate the styles you want then load them into the single shapefile or simply fanout by IGDS_style if you would like to have one single shapefile by style.

I hope this is what you are looking for, I did a short video to show you the steps Click to view the video here .


Hi,

1. Add DGN reader

2. Add AttributeExposer with style attribute exposed (i.e. igds_style or igds_custom_linestyle)

3. Connect to shp writer

4. Connect the requried attributes

Pratap

Hi, thanks pratap, i have two line feature in level 7, one of color "0" and another in color "1". I want the output in a single shape file which have a fieldnamed 'type'.

Now i use attributeExposer to filter using igds_color. I want that it give output in'type' field 'dry' for feature which have color'0' and ' perennial' for '1'color. Hope you get my point.

One more thing how can i use condition e.g. style is 2 then output in attribute field 'abc' and if style is 3 then the value in same field be 'efg'.

Thanks


Hi, thanks pratap, i have two line feature in level 7, one of color "0" and another in color "1". I want the output in a single shape file which have a fieldnamed 'type'.

Now i use attributeExposer to filter using igds_color. I want that it give output in'type' field 'dry' for feature which have color'0' and ' perennial' for '1'color. Hope you get my point.

One more thing how can i use condition e.g. style is 2 then output in attribute field 'abc' and if style is 3 then the value in same field be 'efg'.

Thanks

Please mail me your email .

Thanks


Hi, thanks pratap, i have two line feature in level 7, one of color "0" and another in color "1". I want the output in a single shape file which have a fieldnamed 'type'.

Now i use attributeExposer to filter using igds_color. I want that it give output in'type' field 'dry' for feature which have color'0' and ' perennial' for '1'color. Hope you get my point.

One more thing how can i use condition e.g. style is 2 then output in attribute field 'abc' and if style is 3 then the value in same field be 'efg'.

Thanks

Hi @chowdharysachin,

Use attribute creator with attribute name as "Type" and use Conditional value option in value. provide the conditions as igds_color=0 then result should be dry and igds_color=1 then result should be perennial. similarly use for style as well as required. my email id is kumarchintadri@gmail.com


Hi @chowdharysachin,

You need to expose the format attribute IGDS_style and use a tester or attribute filter to seperate the styles you want then load them into the single shapefile or simply fanout by IGDS_style if you would like to have one single shapefile by style.

I hope this is what you are looking for, I did a short video to show you the steps Click to view the video here .

Hi @gisinnovations

Thanks for the video. I want the same thing but more elaborate. As you have shown writer had igds_style field and it has values 5 and 0. I want one more field suppose field name is "surface" in char.

Now I want that feature with style 5 should have value in "surface" field to be "unmatelled" and similary feature with 0 style should have value "matelled" in surface field.

Help me over this also.

Thanks


Hi @gisinnovations

Thanks for the video. I want the same thing but more elaborate. As you have shown writer had igds_style field and it has values 5 and 0. I want one more field suppose field name is "surface" in char.

Now I want that feature with style 5 should have value in "surface" field to be "unmatelled" and similary feature with 0 style should have value "matelled" in surface field.

Help me over this also.

Thanks

Hi @chowdharysachin very simple, I would just use a transformer that manipulates attributes, perhaps AttributeCreator in your case rename the IGDS_Style to surface and in each attribute you put the default value "unmatelled" or "matelled".

 

 


Reply