1) For an agricultural land to be exempt from definition of Capital Asset, it should be situated beyond the Specified Area.
Specified Area means: a) Any area which is comprised within the jurisdiction of a municipality or a Cantonment Board AND which has a population of not less than 10,000; or b) Any area within the distance specified hereunder measured AERIALLY from the limits of such municipality or Cantonment Board: Population more than 10,000 upto 1 lakh, distance from limits is 2 kms. Population more than 1 lakh upto 10 lakh, distance from limits is 6 kms. Population more than 10 lakh, distance from limits is 8 kms.
Thus, in your case if the said land is not rural agricultural land and thus a capital asset, and hence liable for capital gain
2) Usually the developers convert it to Non-agricultural usage, before transferring the land in their name, and thus the land transferred from the farmer is non-agricultural land and hence liable for capital gains.