Skip to content

Export Bezier curve result to GeoJSON format #4

Open
@Tania526-sudo

Description

@Tania526-sudo

Currently, the Bezier curve is visualized using matplotlib, but not exported for use in GIS platforms.
Goal: Enable saving the generated Bezier curve to GeoJSON, so it can be opened in QGIS, Leaflet.js, or other spatial tools.


Tasks:

  • Convert curve points (x, y) to shapely.geometry.LineString
  • Use GeoDataFrame from geopandas to wrap it
  • Export to output/curve.geojson via to_file(..., driver="GeoJSON")
  • Add a flag or function call in Bezier.py to trigger this export

Dependencies:

  • shapely
  • geopandas

Example code snippet:

from shapely.geometry import LineString
import geopandas as gpd

line = LineString(list_of_xy_points)
gdf = gpd.GeoDataFrame(index=[0], geometry=[line])
gdf.to_file("output/curve.geojson", driver="GeoJSON")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions