Python library for calculating geospatial data from gps coordinates.
Alternatives To Spatialfriend
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Map Matching640612 years ago73September 30, 202026apache-2.0Java
Map Matching based on GraphHopper
Geo16782a month ago34March 04, 202317lgpl-3.0C#
A geospatial library for .NET
3 years ago6agpl-3.0JavaScript
NuPIC demo app for geospatial anomaly detection.
4 months ago6apache-2.0CSS
🌎 Atlas is a set of APIs for looking up information about locations
12 days agomitPython
Utilities for SAR and InSAR processing
Geospatial Storytelling14
6 years ago1mitPython
Visualization of gps tracking data
3 years ago10apache-2.0HTML
Tactical Observation of RF GNSS Interference
4 months agomitC++
Simple, precise, accurate and fast Geographic/Cartesian coordinate transformations via C++ header-only implementation.
6 years agolgpl-2.1C#
A GPS framework for .Net, including device detection, diagnostics, emulators, and a NMEA protocol interpreter
Webcore Presence3
4 years agoJava
Alternatives To Spatialfriend
Select To Compare

Alternative Project Comparisons


Python library for calculating geospatial data from gps coordinates.

Python 3.6 License

⚡️ Project Update ⚡️

This project and its sister project heartandsole were my first real crack at activity file data analysis, and they do not reflect my current standards. I am working on breaking out individual functionalities into separate packages. I will update the README of both packages to refer interested users to my new self-contained, less messy projects. Stay tuned, and check out the Project Status section below for specifics.

Table of Contents

The Elevation Profile Smoothing Algorithm

🎉 Moved over to my pandas-xyz package. Read about it over there!

Dependencies and Installation

Base Installation

GeoPy, Google Maps, NumPy, Pandas, and SciPy are required for the base installation.

pip install spatialfriend to install.

Extra: Elevaton values from .img files

⚡️ Update ⚡️ This is now handled by my elevation-query package, and more flexibly too.

Extra: Elevation values from the National Map

⚡️ Update ⚡️ This is now handled by my elevation-query package, and it works much faster over there.


import spatialfriend as sf

import config  # a hidden file containing user-specific info.

# Initialize an Elevation object.
lonlat_list = [[-105.0, 40.0], [-105.1, 40.0], [-105.1, 40.1]]
elev_helper = sf.Elevation(lonlat_list,

# An array of cumulative distances to each point from the beginning
# of the lonlat sequence.
distances = elev_helper.distance

# Get google maps elevations at each point.
google_elevs ='feet')

# Get elevations from the .img files that live in `img_dir`
# (if those img files cover the specified coordinates).
img_elevs = elev_helper.img(units='feet')

# Compare the elevation gain using the different elevation sources.

# Use the algorithm to smooth the elevation profiles, and calculate
# reasonable grades between points.
grade_google = sf.grade_smooth(distances, google_elevs)
grade_img = sf.grade_smooth(distances, img_elevs)

Project Status


  • Create package on PyPi.
  • Implement an algorithm to smooth noisy elevation data.
  • Implement (some) tests.

Position, distance, elevation, and grade algorithms

  • Publish a separate repo called pandas-xyz, which is the location of ongoing development of the distance, elevation, and grade calculations started here.

Elevation data

  • 🎉 Publish a separate repo called elevation-query, which takes over the elevation-from-GPS role of this repo and will be the location of continuing development.

Current Activities

  • De-clutter this project, as it has splintered into many separate packages and projects. Refer users to my new projects that accomplish the functionality once found here.


Reach out to me at one of the following places!



This project is licensed under the MIT License. See LICENSE file for details.

Popular Gps Projects
Popular Geospatial Projects
Popular Hardware Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.