{"id":"point-in-polygon-classify","version":"1.0.0","description":"Classifies a rational-coordinate point as inside, outside, or boundary using an exact half-open ray rule.","supported_operations":["classify point in polygon","test rational point against polygon","detect point on polygon boundary","exact even odd polygon containment","point inside outside or boundary","half open ray casting classification"],"unsupported_operations":["repair a self-intersecting polygon","compute polygon area or distance"],"semantics":["Coordinates are canonical reduced rational strings and all predicates use exact integer arithmetic.","Boundary is checked first; otherwise a positive-x ray counts crossings with the lower endpoint included and upper endpoint excluded.","Odd crossings are inside and even crossings are outside; the input polygon must be bounded and simple."],"limits":{"max_input_bytes":32768,"max_vertices":256,"max_coordinate_chars":38,"max_integer_digits":18,"max_pair_checks":32640,"max_output_bytes":128},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"properties":{"point":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"string","minLength":1,"maxLength":38,"pattern":"^-?(0|[1-9][0-9]{0,17})(/([2-9]|[1-9][0-9]{1,17}))?$"},"y":{"type":"string","minLength":1,"maxLength":38,"pattern":"^-?(0|[1-9][0-9]{0,17})(/([2-9]|[1-9][0-9]{1,17}))?$"}},"required":["x","y"]},"polygon":{"type":"array","minItems":3,"maxItems":256,"items":{"type":"object","additionalProperties":false,"properties":{"x":{"type":"string","minLength":1,"maxLength":38,"pattern":"^-?(0|[1-9][0-9]{0,17})(/([2-9]|[1-9][0-9]{1,17}))?$"},"y":{"type":"string","minLength":1,"maxLength":38,"pattern":"^-?(0|[1-9][0-9]{0,17})(/([2-9]|[1-9][0-9]{1,17}))?$"}},"required":["x","y"]}}},"required":["point","polygon"]},"output_schema":{"type":"object","additionalProperties":false,"properties":{"classification":{"type":"string","enum":["inside","outside","boundary"]},"crossings":{"type":"integer","minimum":0,"maximum":256},"rule":{"type":"string","const":"even-odd-positive-x-half-open"}},"required":["classification","crossings","rule"]},"examples":[{"input":{"point":{"x":"1/2","y":"1/2"},"polygon":[{"x":"0","y":"0"},{"x":"2","y":"0"},{"x":"0","y":"2"}]},"output":{"classification":"inside","crossings":1,"rule":"even-odd-positive-x-half-open"}},{"input":{"point":{"x":"0","y":"1"},"polygon":[{"x":"0","y":"0"},{"x":"2","y":"0"},{"x":"0","y":"2"}]},"output":{"classification":"boundary","crossings":0,"rule":"even-odd-positive-x-half-open"}}],"execute_url":"/v1/tools/point-in-polygon-classify/versions/1.0.0/execute"}