Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chanwutk committed Feb 25, 2024
1 parent 432113e commit c7a4374
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spatialyze/utils/F/contained_margin.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from ...predicate import (
AtTimeNode,
CallNode,
GenSqlVisitor,
LiteralNode,
PredicateNode,
TableAttrNode,
TableNode,
call_node,
)
from .common import default_location as dl


@call_node
Expand All @@ -17,11 +18,11 @@ def contained_margin(
):
assert kwargs is None or len(kwargs) == 0, kwargs
point, geom, margin = args
assert isinstance(point, TableAttrNode), point.__class__.__name__
assert isinstance(point, (TableAttrNode, TableNode)), point.__class__.__name__
assert isinstance(geom, CallNode) and geom.name == "road_segment", geom.__class__.__name__
assert isinstance(margin, LiteralNode) and isinstance(
margin.value, (int, float)
), margin.__class__.__name__

point = AtTimeNode(point)
point = dl(point)
return f"containedMargin({','.join(map(visitor, [point, geom, margin]))})"

0 comments on commit c7a4374

Please sign in to comment.