Coating method for coating a component with a coating agent, having the following steps: a) presetting at least one coating path (13, 15) of a coating robot for moving a paint impact point of an application device along the preset at least one coating path (13, 15) over the surface of the component to be coated, the at least one coating path (13, 15) running through a surface region of the component to be coated which is bounded by edges, b) presetting reference values of the spatial edge point positions and/or the edge point orientations for edge points on the edges of the surface region, c) spatial measurement of position, orientation and/or shape of the component to be coated or a part of the component to be coated by means of a measuring system, whereby measured values of the edge point positions and/or the edge point orientations of the edge points on the edges of the surface region are measured, d) determining the deviation between the measured values of the edge point positions and/or the edge point orientations on the one hand and the reference values of the edge point positions and/or the edge point orientations on the other hand, and e) adjusting the coating path (13, 15) as a function of the deviation between the reference values of the edge point positions and the measured values of the edge point positions, f) moving an application device along the at least one adapted coating path (13, 15) over the surface of the component to be coated, and g) applying the coating agent by the application device to the surface of the component to be coated during the movement of the application device along the at least one adapted coating path (13, 15). a) presetting at least one coating path (13, 15) of a coating robot for moving a paint impact point of an application device along the preset at least one coating path (13, 15) over the surface of the component to be coated, the at least one coating path (13, 15) running through a surface region of the component to be coated which is bounded by edges, b) presetting reference values of the spatial edge point positions and/or the edge point orientations for edge points on the edges of the surface region, c) spatial measurement of position, orientation and/or shape of the component to be coated or a part of the component to be coated by means of a measuring system, whereby measured values of the edge point positions and/or the edge point orientations of the edge points on the edges of the surface region are measured, d) determining the deviation between the measured values of the edge point positions and/or the edge point orientations on the one hand and the reference values of the edge point positions and/or the edge point orientations on the other hand, and e) adjusting the coating path (13, 15) as a function of the deviation between the reference values of the edge point positions and the measured values of the edge point positions, f) moving an application device along the at least one adapted coating path (13, 15) over the surface of the component to be coated, and g) applying the coating agent by the application device to the surface of the component to be coated during the movement of the application device along the at least one adapted coating path (13, 15).