Skip to main content

isard-map

isard, the IGN's WebGL2 map engine, in Jupyter: a notebook widget (JupyterLab, Notebook, VS Code, Colab) showing the globe or a flat map, the relief, vector tiles, 3D Tiles and the data of your frames, its layers set from Python.

pip install isard-map            # geopandas too: pip install "isard-map[geo]"
import geopandas as gpd
from isard_map import Map

m = Map(center=(2.35, 48.85), zoom=15, pitch=60, basemap="ign-plan")
m.add_circles(gpd.read_file("places.geojson"), color="#e8590c", radius=6, stroke_color="#fff", stroke_width=2)
m

The map

Map(center, zoom, pitch, bearing, basemap, height="500px", **options): options are those of isard's GeoMap.create, in snake_case or camelCase (terrain={"model": "ign"}, projection="globe", quality="medium"…). m.camera tells where the map stopped last.

Layers

m.add(type, data=None, id=None, **options) adds a layer of isard's map.add ("circles", "lines", "fills", "extrusions", "tiles3d", "models"…) and returns its id; the same id replaces it. data is GeoJSON: a dict, a JSON string, or anything with __geo_interface__ (a GeoDataFrame, a GeoSeries, a shapely geometry), a frame with a CRS brought to WGS 84 first. Shortcuts: add_circles, add_lines, add_fills, add_extrusions, add_tiles3d. m.set_data(id, data) sets a layer's data anew (in place on the map), m.remove(id) takes it away.

m.add_extrusions(buildings, height=prop("hauteur", 6), color="#d0d0d0")  # from isard_map import prop
m.add_tiles3d("https://webimaging.lillemetropole.fr/externe/maillage/2020_mel_5cm/tileset.json")

Camera and clicks

m.fly_to(center, zoom=…, pitch=…, bearing=…, duration=…), m.ease_to(…), m.set_camera(…). m.on_click(callback): each click as {"point", "lon_lat", "feature"}, feature (its layer's id and properties) when one of the layers is under it.

How it works

The widget (anywidget) runs the page of isard-react-native, the same messages as a React Native app's: isard itself is loaded from jsDelivr (the version this package was made for), so the notebook needs the network. The layers are sent as JSON when they change; a change of their data alone is set in place.

Develop

uv sync && uv run pytest        # in packages/python
bun scripts/build-widget.ts     # the widget's script (src/isard_map/static/widget.js), from js/widget.ts

MIT licence.

Metadata

Release files for isard-map 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for isard-map 0.3.0
File Size Uploaded Provenance Actions
isard_map-0.3.0.tar.gz 208.6 kB Without provenance Details for isard_map-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for isard-map 0.3.0
File Interpreter ABI Platform Actions
isard_map-0.3.0-py3-none-any.whl Python 3 none any Details for isard_map-0.3.0-py3-none-any.whl

Total release size: 224.1 kB

Release files / isard_map-0.3.0.tar.gz

Download URL isard_map-0.3.0.tar.gz
Size 208.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5ad9d5c3e6df5c5f219fb92021de8c6c6cdebeefb6c3576028c8f9db931fd6a2
BLAKE2b-256 checksum
How to use checksums
b36f4a8f0c5d604a59587080f56ad6726f8853ac82335dd792b71581af2431b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / isard_map-0.3.0-py3-none-any.whl

Download URL isard_map-0.3.0-py3-none-any.whl
Size 15.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8df0b7ea86bc0a794890a3d5366524997f9d2abd0dba9bb94924bf2e1f83a22d
BLAKE2b-256 checksum
How to use checksums
0777701cc4c91b022e24d0fd9c211c52f7bf2d2ae97f072b8b28ca4722148091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for isard-map 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page