Skip to main content

Tennis features

The features a tennis surface is drawn from (sportypy._feature_classes.tennis).

BaseTennisFeature​

An extension of the BaseFeature class for tennis features.

The following attributes are specific to tennis 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 is 0.0
  • court_width (float): The width of the court in TV view. The default is 0.0
  • feature_radius (float): The radius needed to draw the feature. This may not be needed for all features. The default is 0.0
  • feature_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 is 0.0
  • field_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.

Baseline​

The baseline of a tennis court.

These are the lines behind which a player will serve the ball. They span the entire width of the court

Sideline​

A sideline on a tennis court.

This may refer to either the singles or doubles sideline.

ServiceLine​

The serviceline on the court.

A serve must land between the net and this line on the proper side of the court to be considered legal and in play.

Attributes​

  • singles_width (float): The width of a singles court in the court's specified units

CenterServiceline​

The center serviceline on the court.

This line divides the service area into two parts: the ad court (left) and the deuce court (right)

Attributes​

  • center_serviceline_length (float): The length of the center serviceline

CenterMark​

The center mark on the baseline of the court.

This line identifies the center point of the baseline.

Attributes​

  • center_mark_length (float): The distance that the center mark on the baseline protrudes forward from its anchor point at the back edge of the baseline

FrontcourtHalf​

One half of the frontcourt (either ad or deuce court).

The left-hand side of the court when facing the net from the nearest baseline is the ad court, and the right-hand side is the deuce court

Attributes​

  • singles_width (float): The width of a singles court in the court's specified units
  • serviceline_distance (float): The distance from the net to the outer edge of the serviceline (the line in front of which a serve must land)

Backcourt​

The backcourt of the tennis court.

This is the area behind the serviceline on the court, contained within the singles sidelines

Attributes​

  • singles_width (float): The width of a singles court in the court's specified units
  • serviceline_distance (float): The distance from the net to the outer edge of the serviceline (the line in front of which a serve must land)

DoublesAlley​

The doubles alley on the tennis court.

This is the area between the singles and doubles sideline. It should run the entire length of the court

CourtApron​

The boundary that surrounds the tennis court.

This is the backstop and the sidestop

Attributes​

  • backstop_distance (float): The distance from the back edge of the baseline to the barrier behind it in the court's specified units
  • sidestop_distance (float): The distance from the outer edge of the sideline to the barrier that runs parallel to it in the court's specified units

Net​

The net on the tennis court.

This divides the court into two halves

Attributes​

  • net_length (float): The length of the net, from post to post, in the court's specified units