Select to view content in your preferred language

Viewshed and line of sight

3333
8
01-27-2016 01:13 AM
PmssS
by
Emerging Contributor

Hi

I have two questions.

The line of sight is a 3d feature class (multipatch) within a GDB, could you tell me how to import it into the city engine and symbolize it according to the field of visibility?

The viewshed has been made with a DSM in ARCMap, The result is a raster would it be better to import the raster to city engine or convert into polygons and import and symbolize it in the city engine?

thanks in advance,

cheers

Pedro

0 Kudos
8 Replies
ThomasKnabl
Esri Contributor

Hi Pedro

The import could be done by dragging the gdb into CE. Doing the symbolization in CE would require writing a cga rule.

For importing the raster you could use File -> Import -> Terrain Import -> choose your viewshed raster as Texture file and may be the DSM as Heightmap file.

0 Kudos
PmssS
by
Emerging Contributor

Hi,

sadly I have done that and it didn't work.

after importing the line of sight, was interpreted by the city engine as a network!

After I created the rule file I was not able to drag it and drop over the selected objects... nothing happens.

I have 3500 lines of sight... maybe it is too much I will reduce this number  and hope for that this is the problem.

Thanks for the viewshed suggestion!

0 Kudos
CherylLau
Esri Regular Contributor

If the GDB contains a multipatch feature class, then you will get shapes in CityEngine.

However, if the GDB contains lines, then you will get a graph network in CityEngine.  You can write rules that can be applied to the street shapes generated on the graph network.  You cannot directly apply rules to the network, but you can apply the rule to the street shape and make the streetWidth as small as you want and make the sidewalks 0.

0 Kudos
PmssS
by
Emerging Contributor

Hello,

I created cylinders in arcscene that replace those lines of sight, and I import those to city engine.

After I generate this rule file:

attr VisCode = ""

@startRule

vector-->

     case VisCode == "1" :

              color (1,0,1)

     else :

              color(0,1,0)

didn't work. any suggestion?

cheers

P

0 Kudos
CherylLau
Esri Regular Contributor

The code looks ok to me.  I would expect all the shapes to be green unless you manually change the VisCode to 1 for some shapes (and these would be magenta).  What is the problem you are encountering?

0 Kudos
PmssS
by
Emerging Contributor

Hi, there

sorry for the late answer... but I had a free  long weekend!

indeed that is happening... but I don't want that. I want it to read the attribute table field named "VisCode". If "1" give one colour if another number give another colour.

I am sure it is easy I just couldn't figure it out.

cheers

Pedro

0 Kudos
CherylLau
Esri Regular Contributor

According to the rules, the value for the attribute VisCode will be set to the empty string by default.  This is a rule set attribute (because its value is determined by the rules).

This can be changed by manually setting the value for this attribute in the Inspector.  Then, the attribute becomes a user set value (indicated by bold font for the value of the attribute in the Inspector).

Or, another way to set the value of this attribute is to link it to an object attribute so that it gets its value from the object attribute of the same name.  I assume this is the option that you are looking for.  To do this, select all your shapes (that you want to apply the rule to), click on the icon (square with arrow) between the attribute name and the value field in the Inspector, select "Object Attribute".  This will make the attribute get its value from the object attribute of the same name.  Note that for this to work, the rule attribute has to have the same exact name as the object attribute.  So, for the rule attribute VisCode, you will need the shape to have an object attribute called VisCode.

0 Kudos
PmssS
by
Emerging Contributor

Hi again,

I had a week with another task and I could not work on this.

Indeed, your third paragraph is what I want!

But the "Object Attribute" is not selectable in the "Attribute Connection Editor" - it informs that: 'none with name VisCode'. As you say, to make it work I would need to have the 'Viscode' attribute in the shape, where I have the values 1 and 2. And all this is there!

When I select all my shapes, in the inspector I navigate into the object attributes. I have several attributes and one of those is the 'VisCode'.

Another thing, in the "Attribute Connection Editor" I can select the Layer attribute, choose the shape and  selecting the attribute (VisCode)... that the CE by default call here the "Object attribute".

Could it be that the I import it as a Multipatch?

thanks in advance

P

0 Kudos