Basketball features
The features a basketball surface is drawn from (sportypy._feature_classes.basketball).
BaseBasketballFeature
An extension of the BaseFeature class for basketball features.
The following attributes are specific to basketball features only. For more information on inherited attributes, please see the BaseFeature class definition. The default values are provided to ensure that the feature can at least be created.
Attributes
court_length(float): The length of the court in TV view. The default is0.0court_width(float): The width of the court in TV view. The default is0.0feature_radius(float): The radius needed to draw the feature. This may not be needed for all features. The default is0.0feature_thickness(float): The thickness with which to draw the feature. This is normally given as the horizontal width of the feature in TV view, however it may be used to specify other thicknesses as needed. The default is0.0field_units(str): The units with which the feature is drawn. The default is"ft"
CourtConstraint
The constraint around the interior edge of the court's boundary lines.
This confines all interior features to be constrained inside the court, as well as any interior plots.
HalfCourt
One half of the basketball court.
Each half court spans from the inner edge of the baseline to the center of the division line, and serves as the base layer of the court
CourtApron
The apron of the court.
The apron is the colored boundary around the exterior of some courts. If no such colored boundary exists, this should take the same color as the court floor
Attributes
court_apron_endline(float): The thickness of the court's apron beyond the endlinecourt_apron_sideline(float): The thickness of the court's apron beyond the sidelinecourt_apron_to_boundary(float): The distance from the inner edge of the court apron to the outer edge of the court's boundary line (sideline and endline will be spaced the same)
CenterCircleOutline
The outline of the circle(s) at the center of the court.
The circle is where the tip-off to the game takes place. The supplied radius (radii) should be measured to the outside of the circle, with the center of the circle(s) being the exact center of the court
CenterCircleFill
The interior of the circle(s) at the center of the court.
The circle is where the tip-off to the game takes place. The supplied radius (radii) should be measured to the outside of the circle, with the center of the circle(s) being the exact center of the court
DivisionLine
The center court line.
This line divides the court in half, and is sometimes referred to as the time line or half-court line. The center of this line goes through the y axis, with half of the line lying in a team's offensive half court and the other half in their defensive half court
Attributes
division_line_extension(float): The distance that the division line extends beyond the sidelines. This may be omitted if the value is 0
TwoPointRange
The area of the court where made baskets are worth two points.
This is the area enclosed by the three-point line's outer edge and the baseline's inner edge
Attributes
basket_center_to_baseline(float): The distance from the center of the basket ring to the inner edge of the baselinebasket_center_to_corner_three(float): The distance from the center of the basket ring to the outer edge of the three-point line in the corner
ThreePointLine
The line separating two-point range from three-point range.
Made shots inside this line count for two points, and made shots from beyond this line are worth three points. The radius of the feature should be to its exterior
Attributes
basket_center_to_baseline(float): The distance from the center of the basket ring to the inner edge of the baselinebasket_center_to_corner_three(float): The distance from the center of the basket ring to the outer edge of the three-point line in the corner
PaintedArea
The painted area inside the free-throw lane.
The painted area may have a margin from the interior edges of the free throw lane, although this margin will default to 0.0 units
Attributes
lane_length(float): The distance from the inner edge of the baseline to the center-court side of the free-throw lane in TV viewlane_width(float): The distance from the outer edges of the free-throw lane when viewing the court in TV viewpaint_margin(float): The distance from the painted area of the lane to the lane boundary lines
FreeThrowLaneBoundary
The outline of the free-throw lane.
The lines providing the boundary to the free-throw lane. When a player is shooting a free-throw, all non-shooting players must be outside of this boundary. NOTE: This does not include lane space markings (blocks), which will be created via the LaneSpaceMark class
Attributes
lane_length(float): The distance from the inner edge of the baseline to the center-court side of the free-throw lane in TV viewlane_width(float): The distance from the outer edges of the free-throw lane when viewing the court in TV view
FreeThrowCircleFill
The filling of the area where a play shoots a free-throw.
The provided radius should be to the free-throw circle's exterior
FreeThrowCircleOutline
The outline of the circle around the free-throw line.
The provided radius should be to the free-throw circle's exterior
FreeThrowCircleOutlineDash
The dashed part of a free-throw circle.
The dashes may not be required by certain leagues
Attributes
start_angle(float): The angle at which the dash should startend_angle(float): The angle at which the dash should end
LaneSpaceMark
The lane space marks (blocks) on the outside of the free-throw lane.
These are the marks where non-shooting players stand during free-throws. Players may not cross these lines before the ball touches the rim on the shot attempt
Attributes
mark_depth(float): The length (measurement in the baseline-to-free-throw-line direction) of lane space marks (blocks) of the free-throw lane
Endline
The endlines on the basketball court.
These are sometimes referred to as the baselines, and are located beyond each basket
Sideline
The sidelines on the basketball court.
These are the lines that run the full length of the court, typically with the team bench areas and substitution areas on their exterior
InboundingLine
The inbounding line.
This is where the ball is inbounded on the sideline when necessary. Lines drawn on the top of the court should be drawn in a top-down direction, and lines on the bottom of the court should be drawn in the bottom-up direction
Attributes
in_play_ext(float): The distance into the court (measured from the inner edge of the sideline) that the inbounding lines protrude into the courtout_of_bounds_ext(float): The distance away from the court (measured from the outer edge of the sideline) that the inbounding lines protrude away the courtdrawn_direction(str): The direction in which to draw the inbounding line
SubstitutionLine
The substitution lines.
This is where players checking into the game wait for a stoppage. Lines drawn on the top of the court should be drawn in a top-down direction, and lines on the bottom of the court should be drawn in the bottom-up direction
Attributes
substitution_line_width(float): The distance away from the court (measured from the outer edge of the sideline) that the substitution lines protrude away from the courtdrawn_direction(str): The direction in which to draw the substitution line
LowerDefensiveBoxMark
The lower defensive box marks.
The lower defensive box is an imaginary box on the court extending from the lines on the baseline to the lines inside the painted area. This box helps determine when a block/charge call should take place, as an offensive player is entitled to move outside of (and subsequently enter) this box without contact
Attributes
extension(float): The distance that the lower defensive box markings extend from their anchor pointsdrawn_direction(str): The direction in which to draw the lower defensive box mark
TeamBenchLine
The team bench line.
Players not in the game must stay within these lines unless moving to the substitution area (see SubstitutionLine class)
Attributes
extension(float): The distance that the team bench line extends from its anchor pointdrawn_direction(str): The direction in which to draw the lower defensive box mark
RestrictedArc
The restricted arc.
The arc located in the free-throw lane. The interior radius should be specified for this feature.
Attributes
backboard_to_center_of_basket(float): The distance from the front face of the backboard to the center of the basket ring
Backboard
The backboard.
This is the backing onto which the basket ring (created separately) is affixed
Attributes
backboard_thickness(float): The thickness of the backboard. This is the observed thickness when viewing the court from a bird's eye view
BasketRing
The basket ring.
The hoop through which the ball must pass to score points for a team
Attributes
basket_ring_connector_extension(float): The distance the basket ring's connector extends from the backboard into the free-throw lanebasket_ring_connector_width(float): The dimension of the piece of the basket ring that connects the backboard to the basket ring. When viewing the court in TV view from above, this is the dimension in theydirectionbackboard_to_center_of_basket(float): The distance from the front face of the backboard to the center of the basket ring
Net
The net.
To make the basket ring easier to identify, the nets will also be drawn onto the plot. They will typically be white in color, although this is customizable for a user