script to extract the maximum size of each feature