This is a POC to show how realtime streaming AIS ( vessel data) can be mapped. It is based on the back of Geoglify which is created by https://github.com/leoneljdias.
I have stripped out all the parts that I deem either do not work or not needed. E.g the Terrestrial strem ais_decoder
isn't needed. Nor was the extra components around llama
which appears to be work in progress.
- The monogodb just holds a limited amount of realtime data for unique vessels. This is good because, you will never run out of disk space!
- The ais stream is free to use
- The POC is quick and easy to spin up
- Easy to visualise data
Make sure you have the following installed on your system:
- Docker
- Ensure that you have sudo access ( double check this)
- Clone this Repository
git clone https://github.com/VireshDoshi/geoglify
cd geogligy
- Start Geoglify using Docker Compose:
docker-compose up -d
-
Verify that Geoglify is running:
- Open your browser and navigate to http://localhost:3000
- Ensure to click on the search to see that a list of vessels appears.
- Click on a vessel to see information
-
Navigate to the API to ensure it is up and running
- Open your browser and navigate to http://localhost:8081/ships
-
Verify the app api route is setup correct by navigating to
- Open a browser window and navigate to [http://localhost:3000/api/ships] (http://localhost:3000/api/ships)
Cables shown in yellow have been added using data provided freely byhttps://kis-orca.org/
To generate new cable data. use the Python script as follows
- download the raw source kis-orca map data file https://kis-orca.org/wp-content/themes/kisorca/js/map-data/map-data-478.js and save it to the
cables/
folder - Add the name of the cable to the
parse_kisorca_source.py
python script and execute it to generate the geojson linestring data. - goto this file and add the cable data
app/components/map/Index.vue
- To view just the ais-stream logs
$ docker compose logs ais-stream -f * replace ais-stream with another service accordinlgy
- To view all running services
$ docker compose ps
- To close down the instances
$ docker compose down
- To rebuild all images without cache
$ docker compose build --no-cache
Follow these steps to do some local app development while keeping the backend services up and running
- Start up the Demo by following the steps above
- Now stop just the app docker container
$ docker compose stop app
- Goto this file
app/nuxt.config.ts
and change the entry fromhost.docker.internal
tolocalhost
- go into the app folder and run
$ brew install node $ npm install $ npm run dev
- Check
http://localhost:3000
to see that the app is running. - Now app code changes can be seen without needing to rebuild the docker images.
Mongodb is where we store the realtime vessel data which is presented on the app frontend via the api. We use mongosh
- find out the mongodb containerid and jump into it
$ docker ps $ docker exec -it 40613f20cf21 bash
- lets now connect to the database cli
mongosh "mongodb://root:[email protected]:27778/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.2.5"
show databases
use geoglify
db.realtime.find()
db.realtime.find({'cargo': 30})
db.realtime.find({'mmsi': '209351000'})
db.realtime.countDocuments({'cargo': 30})
This project is licensed under the MIT License - see the file for details.
Take a look at our code and explore the vast world of Geoglify! We look forward to community contributions and making this project a go-to resource for maritime data analysis and planning in the industry.