2. XapiX Use Cases

Dave Wexler edited this page Jan 11, 2017 · 1 revision

Use Case: Travel Routes and Weather

Many people love to travel and do it often. There are many travel-oriented apps out there that give you many different kinds of data: airline flights and price comparisons, booking hotels, renting cars, etc. How about integrating your travel plans with the weather forecast for your destination? XapiX makes that simple using our provided APIs and our ability to combine them into one custom-designed endpoint ideal for your uses.

For example, you can use the Rome2Rio API’s Routes endpoint with the Segments option selected to return a list of travel options to your user. Then, using the destination city, you can use the Open Weather Map API’s Forecast by City Name endpoint to return weather predictions for the next few days. When combined, you’ll be able to ping one endpoint that you customize on XapiX to include both travel route information and the weather forecast at the destination in one query.

Use Case: Watch out for restricted airspace!

We recently partnered with Dronesmith at the Verizon Mapquest hack-day hackathon in a way that created a nice synergy between Dronesmith, Mapquest, and Airmap, with Xapix linking them together. Dronesmith, a fellow Techstars company, has an API to manage communication with aerial drones, allowing direct software communication with your craft. When planning a flight path, however, it’s certainly important to keep track of restricted airspace so that your drone doesn’t fly where it’s not supposed to. Enter the Airmap API, which provides three different ways of defining a space by map coordinates which will return any restricted airspace zones that intersect with the search criteria. Does your desired flight path go through a major airport’s airspace? Airmap will tell you, and give you contact information to clear your flight plan with them if such information exists.

By using XapiX to combine the Airmap restricted airspace data with flight plan data from Dronesmith, hackathon participants were able to check flight paths against restricted zones, and visually plot their drones’ movements on maps with tools provided by Mapquest. Together, XapiX provided participants with easy access to all the information they needed to model safe drone flight paths.

Use Case: Schemas to optimize your data

Every API has their own way of structuring their responses and reporting their data. This begs the question of when two APIs report similar data but in different ways, which is best for you? Our schemas can help you tailor your API responses to your needs while still letting you mix and match APIs as your project demands--all while increasing data integrity and quality.

Say for example you are creating an app that will both calculate a driving route while simultaneously giving you a price estimate for getting an Uber to transport you. Using the Mapbox driving directions endpoint, you can receive data for a driving trip by providing a starting latitude and longitude and a destination latitude and longitude. The same set of coordinates, provided to Uber’s price estimates endpoint, will get you a price estimates for the various kinds of Uber cars you can summon.

But what’s this? Both APIs provide distance and duration for a route! Since combining these endpoints directly would yield two attributes for distance and time each, each API would trample the other trying to provide this data. And to top it off, their data differs in important ways: Uber’s distance is reported in miles, whereas Mapbox reports in meters, and Uber’s time in seconds is an “estimate” that is different from the calculated total of Mapbox. Which of these values will be best for your purposes?

Using either the route duration or route distance schemas, you can pick which API will have priority in reporting the data to you. Want your distance in miles? Give priority to Uber and your distance will appear that way. Like Mapbox’s more precise calculation of time? Give it the priority and your trip duration will come back calculated to the second. In the end, you as the developer get exactly what you want, and you can rest assured knowing that the data will fit your needs.