Spatial data generated by an Internet of Things (IoT) network is important to assist the spatial analytics process in issues related to smart cities. In these cities, IoT devices generate spatial data constantly. Thus, data can get increasingly voluminous very fast. In this paper, we investigate the challenge of managing these data through the use of a spatial data warehouse designed over a parallel and distributed data processing framework extended with a spatial analytics system. We propose an architecture aimed to assist a smart cities manager in the decision-making process. This architecture integrates a cloud layer where these technologies are located with a fog computing layer for extracting, transforming and loading the data into the spatial data warehouse. Furthermore, we introduce a set of guidelines to aid smart cities managers to implement the proposed architecture. These guidelines describe and discuss important issues that should be faced by the managers. We validate our architecture with a case study that uses real data collected by IoT devices in a smart city. This case study encompasses the execution of three different categories of spatial queries, demonstrating the architecture's efficacy and effectiveness to support spatial analytics in the context of smart cities.