I have an array of objects with each object containing id, type and x and y cordinates
They are classified as follows
id > a unique identifier to d