0

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.

1 Answer 1

0

I have figured one solution. I simply exported the kap file to a GeoTiff using QGIS.

import rasterio
src = rasterio.open("kap5.tif")
from rasterio.plot import show
show(src)

Then I get this.

Nice right coloured map :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.