A system and method are provided for storing spatial data in a key-value database. The key-value database is configured to store value data in relation to key data and to allow retrieval of the value data on the basis of the key data. The spatial data is stored such that each stored value data represents a cluster which is generated by partitioning the spatial data into blocks and grouping the blocks into clusters. The key data, or 'key name', of each stored value data comprises at least a coordinate-based identifier of the respective cluster which is defined with respect to a coordinate system associated with the spatial data. This allows retrieving (part of) the value data of a particular cluster by calculating (part of) the coordinate-based identifier of the cluster. There may thus be no need for a header comprising indexing information. Said storing is suited for databases which are accessed remotely, e.g., if the database is comprised on a cloud-based storage system and the system is comprised in, or the method is performed by, a client connected to the cloud-based storage system.