A swooping Magpie is protecting its territory and nest, it will only
act in this manner at breeding time and you will find that it is only
some birds that will do this. It is usually as a result of previous
perceived intrusion on it's territory. 
Magpies are territorial and can not be relocated, in springtime they
have eggs or young, if the offending adult bird was to be relocated
there would be no parent bird to look after the young, and they would
starve to death.You would also have another Maggie move in as soon
as the territory became vacant.
So how do we overcome this problem?
There is a number of ways to deal with this; one would be to avoid
the area for the short time the Maggie is nesting, another is to carry
an open umbrella, wear a hat (good practice anyway in this climate)
carry a stick just above your head, do not try to hit the Magpie as
this will only make it even more aggressive to the next person. If
possible use the other side of the road or garden while Maggie is
breeding, and enjoy watching the young as they learn from their devoted
parents.
Alert other people in the area to the fact that a
Magpie is nesting by erecting a sign.
Magpies build a nest fairly high up in the trees, the basket like
nest is made from sticks leaves and grasses, they make use of things
like string, rope, wire, hair and anything else they may think useful.
They will reuse the nest year after year doing repair work every new
season.

Breeding takes place from June till December. The eggs take about
21days to hatch, and the young will spend about 4 weeks in the nest
before they leave. The nest is the most dangerous place for a juvenile
bird, as predators can easily find them, so the parent birds will
encourage the young to leave as soon as possible. They will leave
the nest before being able to fly, they will flutter from bush to
bush being fed by the parents. You will usually hear them being very
noisy at this particular time of the year, as they beg for food from
exhausted parents.
Magpies are great visitors to your garden, as they
eat a variety of destructive insects, so please remember if you spray
for these insects, you malso poison your natural pest control being
birds like Magpies, that will over a period of time, do the job for
you.
Do not be tempted to feed wild birds, the natural balance is easily
upset, instead place a bird bath in your garden, and remember to change
the water regularly to minimise the chance if decease.