Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am having difficulties creating turn restrictions in ArcObjects. I have found a way to Add a a network turn to restrictions through the INetworkForwardStarEx.AddTurnRestriction() interface. But how to I create the INetworkTurn that this method takes.

share|improve this question
add comment

2 Answers

INetworkTurn is a noncreatable object. You can only get it from querying an existing turn element. So if the turn you are trying to query does not yet exist, you will have to first create it.

Once you do have a turn, you will need to use INetworkQuery.QueryTurn and pass in the turn element ID as an argument.

http://resources.esri.com/help/9.3/ArcGISEngine/arcobjects/esriGeoDatabase/INetworkQuery_QueryTurn.htm

This method will return INetworkTurn for you. You can then pass this value into INetworkForwardStarEx.AddTurnRestriction()

Hope this helps.

share|improve this answer
add comment

My guess is that you have to have to embed the ID for the from and to interior or exterior edges in the arc.object this creates.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.