{"id":18673909,"url":"https://github.com/baadjis/geopath","last_synced_at":"2026-05-06T02:38:52.015Z","repository":{"id":102072204,"uuid":"402938122","full_name":"baadjis/geopath","owner":"baadjis","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-04T12:10:50.000Z","size":3687,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T11:06:56.682Z","etag":null,"topics":["api-rest","docker","docker-compose","docker-hub","geolocation","golang"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baadjis.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-09-04T01:38:49.000Z","updated_at":"2021-10-02T00:22:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c9756d7-eeda-4093-b35d-a118bb9b88da","html_url":"https://github.com/baadjis/geopath","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/baadjis/geopath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baadjis%2Fgeopath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baadjis%2Fgeopath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baadjis%2Fgeopath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baadjis%2Fgeopath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baadjis","download_url":"https://codeload.github.com/baadjis/geopath/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baadjis%2Fgeopath/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262388463,"owners_count":23303320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-rest","docker","docker-compose","docker-hub","geolocation","golang"],"created_at":"2024-11-07T09:16:59.322Z","updated_at":"2026-05-06T02:38:51.949Z","avatar_url":"https://github.com/baadjis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Geopath\n\nAn API and web app written in golang :\n\nThe API endpoints help to create and get geojson data and get distances and durations.\n\nThe web app allows to represent paths(linestrings) in a map\n\n\n## requirements:\n\n## Install \n\n\nfirst clone this repository\n\nthe app will run in a docker container and the\ndocker commands are shortcuted in a makefile.\n\n\n\nto build the image run:\n\n```\n$ make build\n\n```\n\nyou can list more commands shortcuts by running the help command:\n\n```\n$ make help\n```\n\n## Run\n\nstart docker\n\n```\n\n$ make start\n\n```\n  and launch the web server \n\n```\n$ make up\n```\nthe server will be running at : \n\nhttp://localhost:10000\n\n## Usage\n\n### API\n\nThe backend contains a REST API built with flask and flak_restfull.\n\nThe API has 4 endpoints:\n\n\n #### /getPath\n\n  return the data in a geojson representation:\n\n `GET /getPath`\n\n curl \u0026nbsp; -i \u0026nbsp; -H \u0026nbsp; 'Accept: application/json'\u0026nbsp;  http://localhost:10000/getPath\n\n will return :\n\n add a new feature to the feature collection:\n\n `POST /getPath`\n\n where data to post is in this json format:\n```\n{\n    \"pathname\": pathname\n    \"coordinates\":coordinates\n}\n```\n where   ```pathname ```  is a string and  ```coordinates ```  is  an array of 4 dimensions arrays of floats\n\nexample:\n\n\n```\n[\n\n        [\n    \n          longitude, \n\n          latitude,\n\n          altitude,\n\n          timestamp\n        ],\n        [\n    \n          longitude1, \n\n          latitude1,\n\n          altitude1,\n\n          timestamp1\n\n],\n\n...\n]\n```\n\n \n #### /getDistance\n\n \n  list of all saved paths distances:\n\n `GET /getDistance`\n\n curl \u0026nbsp; -i \u0026nbsp; -H \u0026nbsp; 'Accept: application/json' \u0026nbsp; http://localhost:10000/getDistance\n\n will return:\n ```\n HTTP/1.1 200 OK\nContent-Type: application/json\nDate: Fri, 03 Sep 2021 15:28:01 GMT\nContent-Length: 80\n\n{\n\"path1\":75.05008730255076,\n\"path2\":163.4858058443857,\n\"path3\":30.485916554839854\n}\n ```\n you can add a parameter to the request to get the distance of a specific path\n\n example:\n\n curl \u0026nbsp; -i \u0026nbsp; -H \u0026nbsp; 'Accept: application/json' \u0026nbsp; http://localhost:10000/getDistance?path=path1\n \n will return :\n ```\n HTTP/1.1 200 OK\nContent-Type: application/json\nDate: Fri, 03 Sep 2021 15:32:11 GMT\nContent-Length: 17\n\n75.05008730255076\n\n ```\n\n#### /getDuration\n\nlist all saved paths durations:\n\n `GET /getDuration`\n\n curl \u0026nbsp; -i \u0026nbsp; -H \u0026nbsp; 'Accept: application/json' \u0026nbsp;  http://localhost:10000/getDuration\n\n will return :\n\n  ```\nHTTP/1.1 200 OK\nContent-Type: application/json\nDate: Fri, 03 Sep 2021 15:35:25 GMT\nContent-Length: 40\n\n{\"path1\":9000,\n\"path2\":9000,\n\"path3\":3000\n}\n\n ```\n\n you can add a parameter to the request to get the duration of a specific path\n\n example:\n\n curl \u0026nbsp; -i \u0026nbsp;  -H \u0026nbsp; 'Accept: application/json' \u0026nbsp;  http://localhost:10000/getDuration?path=path1\n\nwill return:\n\n```\nHTTP/1.1 200 OK\nContent-Type: application/json\nDate: Fri, 03 Sep 2021 15:40:25 GMT\nContent-Length: 4\n\n9000\n\n```\n#### /getPathNames\n\nlist of all saved paths names:\n\n `GET /getDuration`\n\n example:\n curl \u0026nbsp; -i \u0026nbsp; -H \u0026nbsp; 'Accept: application/json'\u0026nbsp; http://localhost:10000/getPathNames\n \n will return:\n\n ```\nHTTP/1.1 200 OK\nContent-Type: application/json\nDate: Fri, 03 Sep 2021 15:52:05 GMT\nContent-Length: 25\n\n[\"path1\",\"path2\",\"path3\"]\n\n ```\n\n\n### web app\n\nThe  web app is UI to represent a linestring in a map using leaflet.js including 3 functionalities:\n* select the path(linestring) to visualize on the map \n   and show distance and duration:\n\n   use the select input to choose the path(s) you want to visualize\n*  save a new path (add new feature to the linetrings featurecollection):\n\n   click the \"add new path\" button a modal will show up and allow you to create and save a new path\n\n\n\n\n## Next todos\n\nIn the future we will :\n\n* add ArangoDB database\n\n* improve the ui","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaadjis%2Fgeopath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaadjis%2Fgeopath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaadjis%2Fgeopath/lists"}