TUDelft-CITG / OpenCLSim

Rule driven scheduling of cyclic activities for in-depth comparison of alternative operating strategies.
https://openclsim.readthedocs.io
MIT License
14 stars 18 forks source link

Bug/example notebook coordinates #19

Closed AnneHommelberg closed 6 years ago

AnneHommelberg commented 6 years ago

When running the cell which creates the kml for the visualization in the example notebook, this error occurred:

TypeError Traceback (most recent call last)

in () 23 begin = my_env.epoch + datetime.timedelta(seconds=site.t[i]) 24 end = my_env.epoch + datetime.timedelta(seconds=site.t[i+1]) ---> 25 pnt = fol.newpoint(name='', coords=[site.geometry["coordinates"]]) 26 # convert to string 27 pnt.timespan.begin = begin.isoformat() TypeError: 'Point' object is not subscriptable This was due to the change from using a geojson geometry to shapely.geometry.Point (which don't support indexing with ["coordinates"]).