A model for spatial binary data