I would like to create maps which contains created product and some shapefiles (for example rivers) using Python script.
It would be nice to have such things as north arrow, scale or coordinates, but if it will be not possible, I will try to handle it.
As I can see there’s an option within the interface which allows to export view to image:
@marpet Thank you for response. Since you told me that there’s no good API for displaying maps,
I wrote a small function in Python which calls GDAL:
It works for small files (for example SMOS L3) - I am able to save map as an .png image.
However, there are some some crucial limitations (maybe you could suggest solution).
Issues:
I am unable to plot big data (for example Sentinel file) - I guess that it is because of the following line which loads whole data set to memory (MemoryError):
data = gdata.ReadAsArray()
I use ‘data’ only in one place - providing ‘data.T’ as parameters. Maybe there’s another way to do that?
there are no coordinates displayed
I’m not sure how to add another shapefile. I think that it will be more correct to provide ‘shapefile’ as an array of shapefiles (path to shapefiles) and similarly to provide ‘raster’ as an array of raster file paths.