Skip to main content
Question

Master Map GML to AutoCad Colouring in!

  • September 13, 2013
  • 9 replies
  • 18 views

Morning,

 

 

I have been happily using FME to translate out raw MasterMap GML files into DWG files for our architects. The fan-out by Attribute has been an invaluable tool.

 

 

However, they have now asked if I can get the lines coloured in for them... I have tried everything i can think of but cannot seem to do it. 

 

 

Ill try to explain further... one of the readers is TopograhpicLine. When fanned out by Descriptivegroup our Architects can switch on and off buildings, a road, general features etc. It is these fanned out features they want different colours so for example buildings red, woodland green.

 

 

Any assistance in this would be much appreciated!

Ben

9 replies

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 13, 2013
You can use an attributevaluemapper to set the colour depending on the descriptive group

  • Author
  • September 13, 2013
I have triesd this with no luck, my output lines remain red

ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 13, 2013
Which attribute are you changing, i just tested using fme_color and it worked fine

  • Author
  • September 13, 2013

I am changing TopographicLine:

 

Source Attribute: DescriptiveGroup

 

Destination Attribute: FME_Color

 

Default Value: Unkown

 

 

Mapping Direction: Forward (Source to Destination)

 

 

and then just as a trial have chosen two Values

Building | 0,01,

 

Path | 0,1,0

I have also kept the Fan Out option crossed.

 


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • September 13, 2013
Hi,

 

 

You need to convert the RGB values in to correct fme color definitions,

 

Try the following:
  • Use an attribute splitter to devide the RGB
  • Calculate for each value the fme color equivalent (R value /255.0) (attribute creator > arithmetic editor)
  • Recombine fme RGB values into the fme_color attribute (string concatenator)
  • Use the fme_color attribute in the DWG styler.
You can create a custom transformer for future use.

 

Hope this helps,

 

Itay

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • September 13, 2013
That is if you have the RGB values in the GML...if you just make up a few instead in the attribute mapper then use the correct fme attribute naming for color (case sensitive): fme_color and fme_fill_color

 


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • September 13, 2013
That's strange, the process works for me

 

 


  • Author
  • September 13, 2013

Oh my goodness!! Thankyou so much EGomm your post made me persevere and showed i was doing somthing right.

 

 

Thankyou Itay for helping place the last piece of the jigsaw in! It turns out that my chubby little finger likes pressing the caps button and therefore by just changing FME_Color to fme_color I can please the architects!

 

Thank you all very much!


fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • September 13, 2013
Hi,

 

 

Actually it should work with any attribute name including FME_Color.....:(

 

 

Glad to hear you have the solution.

 

 

Cheers,

 

Itay

Reply


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