Home Applications GeoDatas
This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
0 reviews
IPM installs
Pull requests
This project contains an example of how we get to manipulate geographic data on an IRIS Intersystem platform.

What's new in this version

update the README.md

Project description

This project contains an example of how we get to manipulate geographic data on an IRIS Intersystem platform.

It holds a simple scheme about restaurants and deliverypeople, checking the distance between them.

The platform also has a REACT made interface to view data and a REST layer, allowing to handle endpoints.


Verify if you have Docker, Node JS and Yarn downloaded and installed.


Clone/git pull the repository into any local directory

$ git clone 

Open the terminal in this directory and run for build the backend:

$ docker-compose build --no-cache

Run the IRIS container with your project:

$ docker-compose up -d

Install Front-End

Create and configure your token at https://account.mapbox.com/auth/signin/ and copy to file “.env.exemple” in /front/web/.env.exemple
Rename the file to .env

To load the front-end just enter the front / web folder and run the following commands

$ yarn install
$ yarn start

In the front-end we have an example of how we can view the data returned by the REST API

In the example we have delivery people who are linked to restaurants.

Clicking on the map We define an observation point, the COUNT field defines how many deliverers the API will return, and the restaurantID field will only search for deliverers from the desired restaurant.

Example if we click anywhere and fill
COUNT 1 and restaurantID 2
The delivery man closest to the chosen point, who works for the restaurant with ID 2, will appear

About the projet

The project allows to carry out queries related to distance, for data that have the attributes of latitude and longtude, through SQL variables.

From the User.SQLvar class we have the methods “Distance” and “LocalityIsWithin” that we can use to make these calculations based on the Haversine formula.

Examples of SQL commands

Checking the distance between Deliveryman and Restaurant

Distance(latitude,longitude,Restaurant->latitude,Restaurant->longitude ) As  DistanceToRestaurant
FROM IrisFood.Deliveryman
ORDER BY DistanceToRestaurant

Checking the Deliveryman closest to restaurant 1 within a 5km radius

Top 1
Distance(latitude,longitude,Restaurant->latitude,Restaurant->longitude ) AS Distance
FROM IrisFood.Deliveryman
LocalityIsWithin(latitude,longitude,Restaurant->latitude,Restaurant->longitude, 5) =1 AND 
Restaurant = 1
ORDER BY Distance

Made with
1.0.125 Jan, 2021
Technology Example
Works with
CachéInterSystems IRIS
First published
25 Jan, 2021
Last checked by moderator
27 Jun, 2023Works