Skip to content

Examples

The first argument is a file that GeoPandas can open: GeoParquet, GeoJSON, GeoPackage, Shapefile and others. The files named after --example come with pixel-map.

$ pixel-map --example monaco_buildings

Buildings of Monaco

Your own data

Here are the urban areas of Natural Earth:

$ curl -sLO https://raw.githubusercontent.com/nvkelso/natural-earth-vector/master/geojson/ne_10m_urban_areas.geojson
$ pixel-map ne_10m_urban_areas.geojson

Urban areas of the world

Bounding box

--bbox takes west, south, east and north in degrees. The map is extended to the shape of the terminal:

$ pixel-map ne_10m_urban_areas.geojson --bbox -5,50.5,9,54

Urban areas of England, Belgium and the Netherlands

Light mode

$ pixel-map ne_10m_urban_areas.geojson --bbox -5,50.5,9,54 --light

Urban areas on the light basemap

Multiple files and colors

A color is anything that matplotlib understands. Pass one per file, or one for all of them:

$ pixel-map --example london_buildings london_water london_park -c sandybrown,#33a1fd,C2

Buildings, water and parks of London

Opacity

The basemap shows through, and so do the overlapping files:

$ pixel-map --example london_buildings london_water london_park --light -c C1,C0,C2 -a 0.8,0.3,0.5

Buildings, water and parks of London with three opacities

Full screen

$ pixel-map --example london_buildings --fullscreen

Map without a border

Size

The map fills the terminal. --width and --height set other sizes, in columns and lines:

$ pixel-map --example monaco_buildings --width 120 --height 34

Map of 120 columns and 34 lines