Visualization
Spatial AI provides functions for plotting spatial data and displying basemaps.
Plotting
Instances of SpatialDataFrame
can be plotted using the instance method oraclesai.SpatialDataFrame.plot()
which ultimately calls the plot_geometries()
method listed below.
Clustering results can be visualized using the plot_clusters
function.
All the plotting functions work with either, a SpatialDataFrame
or geopandas.GeoDataFrame
.
|
Plot data using matplotlib. |
|
Plot clustering result using matplotlib. |
Base maps
Spatial AI plotting functions accept the paremeter with_map which, in its simplest form, can take a True value to add the default basemap to a plot.
A basemap can also be specified using a TileProvider instance.
Spatial AI provides basemaps based on eLocation as TileProvider instances.
The following basemaps are available through oralcesai.vis.elocation
:
osm_positron
osm_bright
osm_darkmatter
world_map_mb
It is also possible to add a basemap separetely by calling oraclesai.vis.add_basemap()
.