This won't work if the item doesn't have an `id` property.  It will also be slow because we would look up items over and over again.  both PorcessPoint and ProcessLineString should take at their second parameter the dynamicObject being worked on.