What is mundi.py?

Mundi.py is a Python framework for spatial data analysis. Like geopandas, you can load spatial datasets, interact with geometries via shapely operations, and visualize the results.

Unlike geopandas, mundi.py does not extend from pandas. This results in more Pythonic syntax and reduced memory consumption.

By default, mundi.py only loads relevant chunks of a dataset. This allows a developer to write scripts on 100GB+ of spatial data without manually chunking or sending the operation to a compute cluster.

Geometric operations

In mundi.py, every geometry is a subclass of a shapely geometry. Features are accessed like an array:

from mundipy.utils import plot

# Iterate through NYC boroughs
for borough in boroughs:
  # shapely attributes work fine
  area_sqft = borough.area

  # access features with array notation
  if borough['name'] == 'Manhattan':

  # visualize
  plot(borough, 'borough')

Learn more about geometric operations

Perform intersections, calculate areas, distances, and boundaries of shapes with shapely.

Properties and filtering

Datasets are represented as collections of features. To filter, we iterate over the dataset:

from mundipy.layer import Dataset

ds = Dataset('trails.fgb')

# Get trails over 8 miles long
long_trails = [trail for trail in ds if trail.length > 8 * 5280]

print('Found %d trails over 8 miles' % len(long_trails))


Mundi.py also automatically chooses a projection for geometric operations by selecting a projection that minimizes distortion for the geometries in the operation.

Getting Started