# prettymaps | Marcelo de Oliveira Rosa Prates | Knowledge Base | Instagit

Draw pretty maps from OpenStreetMap data! Built with osmnx +matplotlib + shapely

GitHub Stars: 13.5k

Repository: https://github.com/marceloprates/prettymaps

---

## Articles

### [How `get_perimeter`, `get_boundary`, and `parse_query` Work Together in prettymaps Fetch.py](/marceloprates/prettymaps/fetch-py-functions-get-perimeter-get-boundary-parse-query-prettymaps)

Discover how prettymaps fetch.py functions get_perimeter, get_boundary, and parse_query collaborate to convert your query into a projected polygon for precise map bounds.

- Tags: internals
- Published: 2026-08-20

### [How to Cache GeoDataFrames in Prettymaps for Faster Map Generation](/marceloprates/prettymaps/cache-geodataframes-prettymaps-performance-improvement)

Speed up map generation with prettymaps by caching GeoDataFrames. Learn how this feature eliminates redundant requests and cuts down processing time significantly.

- Tags: performance
- Published: 2026-08-20

### [How to Dilate and Style Streets by Highway Type in Prettymaps](/marceloprates/prettymaps/dilate-style-streets-highway-types-prettymaps)

Learn to dilate and style streets by highway type in Prettymaps. Control street thickness and color using a dictionary for custom map visualizations. Enhance your map designs now.

- Tags: how-to-guide
- Published: 2026-08-20

### [Using Postprocessing Callback Functions to Modify GeoDataFrames Before Rendering in Prettymaps](/marceloprates/prettymaps/postprocessing-callback-functions-modify-geodataframes-rendering-prettymaps)

Dynamically manipulate GeoDataFrames before rendering in prettymaps using postprocessing callback functions. Customize map layers without altering library code.

- Tags: deep-dive
- Published: 2026-08-20

### [Handling Empty GeoDataFrames in Prettymaps: Edge Case Prevention and Best Practices](/marceloprates/prettymaps/handle-edge-cases-empty-geodataframes-prettymaps)

Learn how prettymaps handles empty GeoDataFrames with edge case prevention and best practices. Ensure safe downstream processing by understanding gdf.empty checks.

- Tags: best-practices
- Published: 2026-08-20

### [Geometric Transformations Applied to GeoDataFrames During Plotting in Prettymaps](/marceloprates/prettymaps/geometric-transformations-geodataframes-plotting-prettymaps)

Explore geometric transformations like translate, scale, and rotate applied to GeoDataFrames in prettymaps. Learn how the transform_gdfs function enhances map plotting with Matplotlib.

- Tags: deep-dive
- Published: 2026-08-20

### [How the Streamlit app.py Frontend Provides an Interactive Interface for Prettymaps](/marceloprates/prettymaps/streamlit-app-py-frontend-interactive-interface-prettymaps)

Discover how the Streamlit app.py frontend in Prettymaps delivers an interactive interface with reactive widgets, caching, and export options for stunning map visualizations.

- Tags: how-to-guide
- Published: 2026-08-20

### [Converting Street Network Widths Using `graph_to_shapely` in Prettymaps](/marceloprates/prettymaps/street-network-widths-graph-to-shapely-function-prettymaps)

Learn to convert street network widths using graph_to_shapely in prettymaps. Buffer OSM streets into polygons with custom widths or highway-specific styles.

- Tags: how-to-guide
- Published: 2026-08-20

### [Converting Shapely Geometries to Matplotlib PathPatches with PolygonPatch in prettymaps](/marceloprates/prettymaps/shapely-geometries-matplotlib-pathpatches-polygonpatch-prettymaps)

Learn to convert Shapely geometries to Matplotlib PathPatches using prettymaps PolygonPatch. This function simplifies rendering complex shapes in your maps.

- Tags: how-to-guide
- Published: 2026-08-20

### [Applying Color Palettes to Layers with `fc` and `ec` Parameters in Prettymaps: A Complete Guide](/marceloprates/prettymaps/color-palettes-layers-fc-ec-parameters-prettymaps)

Learn to apply color palettes to layers in Prettymaps using fc for fill and ec for edge colors. Customize your maps with single colors or randomized palettes.

- Tags: how-to-guide
- Published: 2026-08-20

### [How Prettymaps Handles Sea and Coastline Detection and Filtering: A Complete Technical Guide](/marceloprates/prettymaps/sea-coastline-detection-filtering-prettymaps)

Learn how Prettymaps detects and filters sea and coastlines using SRTM elevation data and OpenStreetMap geometries. Get a complete technical guide.

- Tags: deep-dive
- Published: 2026-08-20

### [Available Layer Types in Prettymaps: Streets, Water, and Buildings](/marceloprates/prettymaps/layer-types-prettymaps-streets-water-buildings)

Discover the available layer types in prettymaps: streets, water, and buildings. Learn how each layer type is fetched, transformed, and drawn for beautiful map rendering.

- Tags: getting-started
- Published: 2026-08-20

### [Coordinate Projection and Reprojection with osmnx in prettymaps: A Complete Technical Guide](/marceloprates/prettymaps/coordinate-projection-reprojection-osmnx-prettymaps)

Master coordinate projection and reprojection with osmnx and prettymaps. Learn how to effortlessly transform and display geospatial data for your projects.

- Tags: how-to-guide
- Published: 2026-08-20

### [Generating Output for Pen Plotters Using vsketch Plotter Mode in prettymaps](/marceloprates/prettymaps/pen-plotter-output-vsketch-plotter-mode-prettymaps)

Generate optimized SVG output for pen plotters using prettymaps plotter mode. Leverage the integrated vsketch engine for seamless plotter integration.

- Tags: how-to-guide
- Published: 2026-08-20

### [Geometric Transformation Options in prettymaps: Scale and Rotation Parameters Explained](/marceloprates/prettymaps/geometric-transformation-options-prettymaps-scale-rotation)

Discover how to use scale_x, scale_y, and rotation in prettymaps plot to resize, stretch, mirror, or rotate maps before rendering with Matplotlib.

- Tags: deep-dive
- Published: 2026-08-20

### [Extracting, Matching, and Labeling Keypoints with Fuzzy String Matching in Prettymaps](/marceloprates/prettymaps/extract-match-label-keypoints-fuzzy-string-matching-prettymaps)

Learn to extract match and label keypoints with fuzzy string matching in Prettymaps. Explore the match_keypoint function for precise point of interest identification.

- Tags: how-to-guide
- Published: 2026-08-20

### [How Hillshade Elevation Rendering Works in Prettymaps and Its Dependencies](/marceloprates/prettymaps/hillshade-elevation-rendering-prettymaps-dependencies)

Learn how prettymaps renders realistic hillshaded elevation maps using SRTM data and Matplotlib's LightSource for stunning visual overlays.

- Tags: deep-dive
- Published: 2026-08-20

### [How to Integrate GPX/KML Tracks with prettymaps Using the `gpx` Argument](/marceloprates/prettymaps/integrate-gpx-kml-tracks-prettymaps-gpx-argument)

Easily integrate GPX/KML tracks into prettymaps. Learn how to use the gpx argument to overlay tracks or frame maps automatically for stunning visualizations.

- Tags: how-to-guide
- Published: 2026-08-20

### [How to Combine Multiple Maps Using python `multiplot` Function in prettymaps](/marceloprates/prettymaps/combine-maps-prettymaps-multiplot-function)

Combine multiple maps with Python prettymaps multiplot. Learn to render several geographic regions on one canvas using Subplot objects and custom styling.

- Tags: how-to-guide
- Published: 2026-08-20

### [How Prettymaps Build Perimeters and Boundaries: Circle, Radius, and Dilate Explained](/marceloprates/prettymaps/perimeter-boundary-system-circle-radius-dilate-prettymaps)

Learn how Prettymaps builds perimeters and boundaries using circle, radius, and dilate functions. Understand the three stages of map generation and geometry manipulation for precise map outlines.

- Tags: deep-dive
- Published: 2026-08-20

### [How to Structure Preset JSON Files and Create Custom Presets in prettymaps](/marceloprates/prettymaps/preset-json-structure-custom-presets-prettymaps)

Learn how to structure preset JSON files and create custom presets in prettymaps. Discover how to define layers, styles, and geometric parameters for reusable map configurations.

- Tags: how-to-guide
- Published: 2026-08-20

### [Understanding Layers and Style Parameters in the Prettymaps `plot()` Function](/marceloprates/prettymaps/layers-style-parameters-prettymaps-plot-function)

Master Prettymaps plot function layers and style parameters. Fetch and render OpenStreetMap data with Matplotlib and vsketch for stunning visualizations.

- Tags: deep-dive
- Published: 2026-08-20

### [How to Optimize OpenStreetMap Data Fetching with `unified_osm_request` in prettymaps](/marceloprates/prettymaps/optimize-openstreetmap-data-fetching-unified-osm-request)

Optimize OpenStreetMap data fetching with prettymaps unified_osm_request. Leverage caching, query normalization, and rate-limit handling for efficient data retrieval and reduced network calls.

- Tags: how-to-guide
- Published: 2026-08-20

