Automated detection of entry and exit nodes in traffic networks of irregular shape