Spain has a system of registration of title similar to that in the UK. It works pretty well on the coast but inland for a start there is still a lot of land which is not registered which can be/very often is a can of worms. Secondly, the Land Registries, unlike in UK, take no responsibility for the accuracy of the description of the boundaries or of any plans there may be (unlikely). Sometimes adjoining owners may have the right to buy.
Another point to bear in mind is that unless the land on which the building stands is at least one hectare – and it is not protected (classed as forest or mountain land) – you probably will not be able to extend the building beyond the existing footprint.
Whereabouts are you looking?