@@ -471,6 +471,36 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
471471 [](ExtractionRelationContainer &cont, const ExtractionRelation::OsmIDTyped &rel_id)
472472 -> const ExtractionRelation & { return cont.GetRelationData (rel_id); });
473473
474+ context.state .new_usertype <NodeBasedEdgeClassification>(
475+ " NodeBasedEdgeClassification" ,
476+ " forward" ,
477+ // can't just do &NodeBasedEdgeClassification::forward with bitfields
478+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.forward ; }),
479+ " backward" ,
480+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.backward ; }),
481+ " is_split" ,
482+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.is_split ; }),
483+ " roundabout" ,
484+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.roundabout ; }),
485+ " circular" ,
486+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.circular ; }),
487+ " startpoint" ,
488+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.startpoint ; }),
489+ " restricted" ,
490+ sol::property ([](NodeBasedEdgeClassification &c) -> bool { return c.restricted ; }),
491+ " road_classification" ,
492+ sol::property ([](NodeBasedEdgeClassification &c) -> RoadClassification {
493+ return c.road_classification ;
494+ }),
495+ " highway_turn_classification" ,
496+ sol::property ([](NodeBasedEdgeClassification &c) -> uint8_t {
497+ return c.highway_turn_classification ;
498+ }),
499+ " access_turn_classification" ,
500+ sol::property ([](NodeBasedEdgeClassification &c) -> uint8_t {
501+ return c.access_turn_classification ;
502+ }));
503+
474504 context.state .new_usertype <ExtractionSegment>(" ExtractionSegment" ,
475505 " source" ,
476506 &ExtractionSegment::source,
@@ -481,7 +511,9 @@ void Sol2ScriptingEnvironment::InitContext(LuaScriptingContext &context)
481511 " weight" ,
482512 &ExtractionSegment::weight,
483513 " duration" ,
484- &ExtractionSegment::duration);
514+ &ExtractionSegment::duration,
515+ " flags" ,
516+ &ExtractionSegment::flags);
485517
486518 // Keep in mind .location is available only if .pbf is preprocessed to set the location with the
487519 // ref using osmium command "osmium add-locations-to-ways"
0 commit comments