TransWikia.com

Visualising a Raster (KAP open sea map file) using python with rasterio how do I get the colours correct

Geographic Information Systems Asked by Tuckers on May 20, 2021

I have just started using rasterio to show raster maps in Python. I want to display some OpenSeaMap (KAP raster format). I have started with a single kap file, I can load and display a single kap file. However, the colours are not what I want. My code is below.
`

import rasterio
from rasterio.plot import show
src = rasterio.open("L10-296-560-8-24_10.kap",cmap='')   
show(src)

`
This displays

enter image description here

But what I want is

enter image description here

Does anyone know how I tweek the colormap to get to what I want? Or maybe I should be using a different python library.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP