Help with Mars map

Hi there! I have a stupid question, but I guess you know something about this!
What do I want: simpiest way to plot a shaded area on MOLA map that correspond to FOV of two different instruments on Mars orbit (specifically SPICAM-IR/MEX and NIR/TGO) with python
What do I have: altitude and FOV in degrees
What I don’t want: non-python solutions; complicated methods
Any ideas to do this without reinventing the wheel?

Post was duplicated from OpenPlanetary channel #newcomer-questions by request of @mariodamore


Sorry for really late answer just got very busy this week with a bunch of staff and had no time for this; I will check medium on geopandas, thank you!

1 Like

I did something similar on Mercury, the gist of it is:

  1. INPUT: instrument FOVs, most probably you are dealing with PDS3.
  2. Import 1. via gdal-python (examples in *) or Fiona, sadly Fiona doesn’t support common planetary science formats . I sent an issue for gdal for a specific instrument data format, check twice when importing. Start with a single FOV, then iterate.
  3. OPTIONAL store everything in a Postgis DB or similar (spatialite) to
  4. Get the data you need as a geopandas dataframe (from the 2. directly or as a query from 3.)
  5. Load the MOLA map as geopandas or in the PostGIS
  6. Play with 4. and 5. for intersection/ calculations etc.I prefer to do heavy calculation in PostGIS and have the result as GeoJSON for example.

*: Vector Layers — Python GDAL/OGR Cookbook 1.0 documentation

This (read_mascs_org_dgal.ipynb) is the notebook explaining my problem with gdal, if you skip to cell [119] you’ll see and example of the result of 2.above.
I wasn’t using pandas at the time, but for spatial operation is highly suggested.

As introduction try something like Geopandas — An Introduction - Thoughtful Data Science - Medium or the official docs: Examples Gallery — GeoPandas 0.6.0 documentation