Hello everyone

I would like that you may help me with this following question:

I have data from plant species occurrences from 30 sites (10 beaches with 3 replications for each one; 6 beaches not in erosive process; 4 in erosive process) in coastal dunes vegetation.
At each site I have made data collection along one transect (so all the 30 transects have different lengths and sometimes very different (namely between beaches), the smaller with 8 m and the bigger with 130 m).
I have calculated different ecological indices which gave me naturally 30 different values for each site.
Now, I grouped the 10 beaches in two groups (2 different environmental conditions: erosive beaches (12) and not erosive beaches (18)).
May I compare the two groups with all the data (with all the complete transects) with a t-Test or I have to previously to cut to a common length to all the 30 transects in order to compare statistically the data?
Thanks you for your attention
Sincerely
Josť A Macedo