Hi,
I'm trying to add polygon barriers using the network analyst Java API and am running into a couple problems.
Problem #1 - The barrier feature class fields don't seem to include anything related to barriers (e.g. "BarrierType" or Attr_[Impedance]). (I use INAContext.getNAClasses().getItemByName("Barriers") to get a handle on the barrier feature class.) How can I set the barrier specific fields?
Problem #2 - I imagine the way to implement these polygon barriers is to create polygon geometry, then assign this geometry to a barrier feature. Does this sound right? If so, I get when I do that (using setShapeByRef()) I get AutomationException: 0x80040901. Which leads me to believe I'm either creating the polygon wrong, or perhaps, related to problem #1, it doesn't expect to be given a polygon here.
I'm very new to ArcGIS, and a bit lost, so any help would be much appreciated!
Thanks,
Pete