UP42’s Approach to APIs – By Linda Duffy
The vast wealth of geospatial information available today creates a challenge of how to access data originating at different sources, combine data with various formats, and extract useful insights in an efficient manner. Advances in application programming interfaces (APIs) have had a profound impact on many products by facilitating the integration of geospatial information and analysis, regardless of format or language. From a technical perspective, an API acts as an intermediary that lets two applications talk to each other. In practice, APIs enable programmers to leverage functionality previously only available through a user interface and integrate interaction with APIs into their own code to more efficiently, and often automatically, process, manage and analyze data and report the resulting information.
APIs promote communication
The current technology trend is turning away from closed standalone systems and moving toward the creation of interoperable programs that communicate via APIs. Instead of writing an application entirely from scratch, developers can connect to other programs and re-use code and algorithms that already perform a desired function, and then add unique commands to build their own product. This creates many new opportunities to reduce time-to-market for new products and offer more frequent updates on existing ones.
With demand for easily accessible geospatial data and imagery growing, UP42 saw an opportunity to build a platform with a searchable marketplace that offers satellite imagery and commonly-used processing algorithms, such as vegetation encroachment and object identification, along with scalable cloud computing resources. In addition, basic pre-processing tools, such as raster tiling, are available to prepare data for analysis. Through the UP42 API and Python Software Development Kit (SDK), partners and customers can integrate the UP42 building blocks – geospatial data and algorithms – into their own products for more powerful and efficient solutions.
“The API is our mechanism for customers to access the platform’s functionality in a programmatic way,” explains Nathan Davis, Product Marketing Manager at UP42. “Our workflows are made of data and processing building blocks. An off-the-shelf processing block is a kind of algorithm that performs a certain task, such as vegetation analysis. Users can also create custom blocks to integrate their own existing algorithms and code.”
The UP42 user interface is often used for experimentation, exploration and prototyping to determine whether the available data and processing algorithms can contribute to a solution. The APIs and Python SDK make moving from prototyping to production seamless. Developers can access all the functionality available in UP42’s console within command line tools, such as Jupyter Notebooks. This enables them to build custom, powerful geospatial applications on UP42’s scalable infrastructure.
The true advantage of an API over the traditional user interface becomes clear as more complex tasks are processed. An analytics workflow written in the command line becomes a template, which is more easily automated and applied to multiple jobs. Through the API, the user can quickly replicate the existing workflow with different parameters as many times as necessary, and automatically run the job at designated time intervals – daily, weekly, etc. – with the results being delivered via API and therefore integratable into external solutions or reports. UP42 provides the necessary computing power in the cloud, so processing automatically scales depending on the user’s analytics requirements.
How APIs interact
Today many data and service providers offer APIs that allow users to exchange data and leverage functionality built into different programs. By following certain standards, APIs are able to communicate despite disparate languages and formats.
“We follow the OpenAPI Specification as the standard for how to document and explore the UP42 API,” says Davis. “The REST-API defines rules and constraints. It is easy to use and interoperable.”
On top of the base REST-API, UP42 provides a Python SDK that brings UP42 into the Python ecosystem. Typically a developer writes Python code in Jupyter Notebooks, a well-known command line interface, and the SDK acts as a translation layer between the Python language and UP42’s API, making integration of the UP42 API into a new product or analysis convenient. The Python library also contains analytic and visualization tools made available by others in the open-source community. By integrating the UP42 platform with other solutions, users benefit from the strengths of each.
“Increasingly, the most powerful geospatial solutions contain components from across the ecosystem. For example, LiveEO – an UP42 customer offering solutions in vegetation management and infrastructure monitoring – uses the UP42 API to integrate satellite data and digital elevation models into their platform, upon which they apply machine-learning algorithms and they subsequently visualize. Without APIs, this simply wouldn’t be possible,” Davis states.
The interaction between multiple programs and data sources to return useful information relies on APIs. For instance, to detect cars using machine learning algorithms applied to satellite imagery, the user starts by running an UP42 API command to “create a workflow,” followed by selecting a data block, such as Pleíades imagery, and a processing block – in this case, car detection – and saving the workflow. Another API command is run to trigger the job, at which time the user is prompted to provide parameters, such as area of interest (AOI), date range and maximum cloud cover, as is standard when accessing satellite imagery. The specific job information is added to the API command that is sent to the UP42 server. The job runs the block code in a docker container on the UP42 server. Within that block code a preconfigured API call is made via the data provider’s API. Through the data provider’s API, UP42 has immediate access to a library of archive satellite imagery so it is not necessary to store duplicate copies on the UP42 platform. The image is downloaded to the UP42 server and another API command is run to download the result to the local computer.
Future trend toward APIs
Until recently, geospatial data was used primarily in geographic information systems (GIS) by specialists trained in proprietary GIS programs. However, data scientists today recognize that every data set has a geospatial component and the value to many people lies in the cumulative knowledge extracted from the data. They are increasingly developing new services that deliver the results – the intelligence – rather than the large volumes of data that support the analysis.
Companies are building their own solutions by writing code in the language most suitable for them. Demand for flexibility is causing a shift in business models toward offering services through an API instead of a user interface. The use of APIs enables platforms to cater to a wide range of developers, as the use of the platform is not constrained by a specific programming language. By using APIs, they are creating interoperable ecosystems that support more complex solutions based on the integration of different types of data.
“Multiple products and tools for geospatial analysis used together can provide better results and leverage the strengths of each provider and ecosystem,” says Davis. “There is much more focus on integration with others instead of monolithic closed systems. APIs make it easy to integrate our satellite and related geospatial data into other products.”
UP42 intends to maintain feature parity between its user interface and API, which allows new users to more easily explore the platform and understand the valuable resources it provides. When ready, they can benefit from the speed and flexibility of coding in the SDK and including interaction with the UP42 API in bespoke, production-ready solutions. The focus on open-source code and interoperability with other platforms offers unlimited opportunities within an extensive ecosystem of powerful geospatial data, algorithms, and infrastructure.
Linda Duffy is a geospatial business and market research consultant based in Golden, Colorado. She may be reached at lduffy at aproposresearch.com.