ABSTRACT

This chapter introduces the concepts and technologies that enable a Leaflet map to load data from a spatial database. The CARTO platform provides several cloud computing and web-mapping services. A spatial database is a database that is optimized to store and query data that represents objects defined in a geometric space. In addition to geometry storage, spatial databases define special functions that allow for queries based on geometry. SQL is a language for writing statements to query or to modify tables stored in a relational database, whether spatial or non-spatial. The CARTO SQL application programming interface (API) is an API for communication between a program that understands HTTP, such as the browser, and a PostGIS database hosted on the CARTO platform. The CARTO SQL API allows for users to send SQL queries to their PostGIS database on the CARTO platform.