dabreegster / odjitter

Disaggregate zone-based origin/destination data to specific points
Apache License 2.0
12 stars 6 forks source link

Accept points as well as polygons as input #42

Open mem48 opened 1 year ago

mem48 commented 1 year ago

In some cases, you may have OD data between a zone and a point. E.g. travel to school starts somewhere in the zones but all trips finish at a defined point.

Currently inputting a point into the zones_d argument returns

Error in st_cast.POINT(X[[i]], ...) : 
  cannot create MULTIPOLYGON from POINT
mem48 commented 1 year ago

Semi-realted If you use subpoints for origins then you must use subpoints for destinations. In my case, there is no sub-point just a single point.

Robinlovelace commented 1 year ago

Duplicate of https://github.com/dabreegster/odjitter/issues/25

There is already a work-around which I developed for CRUSE: https://github.com/dabreegster/odjitter/issues/31

I created a small e.g. 100 m buffer around each school and passed those to zones_d. Any reproducible example, or even better improvements to the documentation/code welcome.

dabreegster commented 1 year ago

Emma's hit this problem as well. In the short term, the workaround is to make a zone for each school point and make the polygon be a small circle around the point. odjitter itself could be more flexible here though.