Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Output Formats #90

Open
SteffenME opened this issue Dec 4, 2023 · 7 comments
Open

Improve Output Formats #90

SteffenME opened this issue Dec 4, 2023 · 7 comments
Labels
enhancement New feature or request prio:medium

Comments

@SteffenME
Copy link
Collaborator

SteffenME commented Dec 4, 2023

We need a more qualitative output format that gives discreet latitude and longitude to put in a chart plotter.
Possible Solution:

  • Plain text in mail with cluster center/ centrum
  • kml file
  • Raster file for density map
  • grib file
  • Netcdf file

See also #81

@SteffenME SteffenME added the enhancement New feature or request label Dec 4, 2023
@julled
Copy link
Collaborator

julled commented Dec 4, 2023

What would be a good output geometry for input in a plotter?
e.g. kml supports paths and polygons

@julled
Copy link
Collaborator

julled commented Dec 4, 2023

polygon could be created by full enclosing polygon or by slightly outlier filtered polygon.

@julled
Copy link
Collaborator

julled commented Dec 4, 2023

KML it supports acutally more geometrys:

image

@SteffenME
Copy link
Collaborator Author

SteffenME commented Dec 4, 2023

Plotters often do support weather data aka grib files. KML is supported by flight planning tools (if i am not mistaken).

I think the lowest fruit would be plain text in the mail with exact location in dm of clusters

@julled
Copy link
Collaborator

julled commented Dec 4, 2023

Plotters often do support weather data aka grib files. KML is supported by flight planning tools (if i am not mistaken).

I think the lowest fruit would be plain text in the mail with exact location in dm of clusters

yes this is the lowest possible interface, but the area always resembles a complex geometry, which i think should be at best somehow transported too.

Maybe we should investigate / ask which plotters ship use and then provide some more formats. We dont need to limit us to only one.

@SteffenME
Copy link
Collaborator Author

SteffenME commented Feb 3, 2024

KML export all Points with timestamp:

import simplekml
def export_kml(simulation):
    lons,lats=simulation.get_lonlats()
    time_array=simulation.get_time_array()
    kml=simplekml.Kml()
    for i in range(len(time_array[0])):
        for j in range(len(lons[...,i])):
            point=kml.newpoint(name=f'Point{i+j}')
            point.coords=[(lons[j,i],lats[j,i])]
            point.timestamp.when=time_array[0][i].strftime('%Y-%m-%dT%H:%M:%S')

@SteffenME
Copy link
Collaborator Author

SteffenME commented Feb 22, 2024

Density maps can be exported to geotiff with rioxarray. Geotiffs can then be read by opencpn PhotoLayer Plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prio:medium
Projects
None yet
Development

No branches or pull requests

3 participants