Overlay GeoJson on L1B images

Post Reply
n2cr
Posts: 2
Joined: Thu Jun 18, 2020 3:50 pm

Overlay GeoJson on L1B images

Post by n2cr »

I want to overlay the storm info found at https://docs.tidetech.org/storm-api/#. The details in GeoJSON format are available via a REST API.

I'm already generating L1B products using Geo2Grid and want to graphically overlay the storm info during my existing image generation process.

What would be the best way to accomplish this?

Chris
davidh
Posts: 116
Joined: Tue Jun 04, 2013 11:19 am

Re: Overlay GeoJson on L1B images

Post by davidh »

I think it depends what you're comfortable with and what you have experience with. There is nothing in Geo2Grid that does this. There are interfaces in Satpy (the python library underneath Geo2Grid) for adding overlays, but they are pretty limited when it comes to custom lines/polygons and/or text. The libraries Satpy uses to do overlays are called pycoast and pydecorate depending on what is being overlayed. These libraries should allow you to add whatever (in theory) you want, but it would all have to be custom Python code and there is no direct support in these libraries for something like "load all these properties from a GeoJSON file and draw them".

Otherwise, my only other small bit of experience is with Cartopy which may have some examples of plotting things from GeoJSON.

Alternatively, if you can generate a transparent image with the overlay information you want, you should be able to use GDAL command lines tools to combine the geotiff from Geo2Grid with your image.

If you want clarification on any of these topics let me know and hopefully I can guide you to something of a solution.

Dave
Post Reply