Import SHP file

1384
2
12-04-2011 12:12 AM
BorisHaikin
New Contributor II
Hello,
I have shapefile of streets with different types of streets.
I need to use  this attribute  to create streets acording different rules.
How could I reach this data after I import shp file into my project.
How  could I make selection according this parameters.
Thank you
Anna
0 Kudos
2 Replies
MatthiasBuehler1
Frequent Contributor II
hi Anna,

yes, you can do this and for example, we're doing this in the classification if you import osm files.


select the layer into which the street segments are imported, then in the Inspector, you can go grab the Object Attributes which came in with the SHP file.

an example :

class = getObjectAttr("class")

attr streetWidth =
case class == "highway":
  true
else:
  false

an example like this would make it possible to select all graph segments which have the attribute "class" with the value highway ( which is true )
the selection itself is then done in the viewport by RMB-->select by Map Layer.

play with this a little, ok ?

let me know how it goes !
0 Kudos
BorisHaikin
New Contributor II
hi Anna,

yes, you can do this and for example, we're doing this in the classification if you import osm files.


select the layer into which the street segments are imported, then in the Inspector, you can go grab the Object Attributes which came in with the SHP file.

an example :

class = getObjectAttr("class")

attr streetWidth =
case class == "highway":
  true
else:
  false

an example like this would make it possible to select all graph segments which have the attribute "class" with the value highway ( which is true )
the selection itself is then done in the viewport by RMB-->select by Map Layer.

play with this a little, ok ?

let me know how it goes !


Hi,
sorry for delay with answer
it works
thank you
Anna
0 Kudos