Creates SVG maps from geojsons, shapefiles and geodataframes
Project description
svgmapper
svgmapper
generates SVG maps from .geojson
files, Esri shapefiles, and geopandas geodataframes.
Below is a bried overview of how to use svgmapper
and a description of its classes and methods.
Creating a map
from svgmapper import Map, Layer
Map(
name="Map of US and Canada",
css='map.css',
epsg='epsg:2163',
size=(504, 504),
layers=[
Layer(
name='usa-states',
path='north-america/usa-states.geojson'
),
Layer(
name='ca-provinces',
path='north-america/canada-provinces.geojson'
)
]
).save('north-america.svg')
The code snippet above initializes a new map object with the specified Layers
(the drawing order of which is determined by the Layer's index in the provided list). That Map is then
saved to the specified location in the save()
method. The output map looks like below:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
svgmapper-0.1.4.tar.gz
(19.6 kB
view details)
Built Distribution
svgmapper-0.1.4-py3-none-any.whl
(20.5 kB
view details)
File details
Details for the file svgmapper-0.1.4.tar.gz
.
File metadata
- Download URL: svgmapper-0.1.4.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6d7f6eef42e50c683c4b61579f25797c21bb2809840bb1c1335c8b1b5f69b04 |
|
MD5 | 860c51379dc0d707626d8c1ba3bd3740 |
|
BLAKE2b-256 | f10641d672a43ee0b8357ee0a7ddebd6ce07a6774a3f00190da6a940004576c9 |
File details
Details for the file svgmapper-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: svgmapper-0.1.4-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.7 Darwin/23.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ec543121c5215616628c1baf254f72480b9ef3c4b6698eddbd667f834f17d40 |
|
MD5 | b2d6876f652960da65610a6cc27eb281 |
|
BLAKE2b-256 | 4ff7b465394e9b3492689477624ffb22366744536778a555d22d99c5ebfc9b61 |