huracanpy.convert.to_geodataframe#
- huracanpy.convert.to_geodataframe(lon, lat, track_id=None, *, crs=None)[source]#
convert track data to a
geopandas.GeoDataFrameof geometries- Parameters:
lon (array_like) – Longitude and latitude points
lat (array_like) – Longitude and latitude points
track_id (array_like, optional) – Track ID at each point. If track ID is given, each track is treated as a shapely.LineString. Otherwise, each point is a shapely.Point
crs (cartopy.crs.Projection, optional) – The projection of the input data. If None, the data is assumed to be Geodetic.
- Returns:
A GeoDataFrame containing the input tracks a geometries. If track_id is not given the geometries are
shapely.Point, and if track_id is given the geometries areshapely.LineString(split into multiple LineStrings where tracks cross the dateline) orshapely.Pointfor any length-1 tracks- Return type: