What was the logic behind Germany's invasion of Denmark?

In saturdays video the planing of the Germans’ invasion of Norway. Their invasions of the rest of Europe had racist, military and/or ideological reasons, however invading Denmark seemed to just be for an airport to Norway. Did Germany have any other motifs like retaking northern Schleswig, getting more food or to create a model subject state, which became Denmarks purpose later in the war.


With taking both Denmark and Norway the Germans could essentially block off all major Allied fleets from entering the Baltic Sea and later have the effect of cutting off trade to the Soviets through Leningrad (St Petersburg). This was done with two cities, whose names escape my mind at this moment, these cities were on the Danish and Norwegian coasts respectively and fortifications and heavy naval guns were built near these cities. The range of these cities batteries could nearly meet each other in the bottleneck entering the Baltic Sea in the waters North of Jutland. Finally the small gap in between the range of these guns was heavily mined essentially blocking off free and safe entry into the Baltic by either risking hitting a mine or moving into range of the German coastal batteries. Closing off the Baltic with to the Allies has many benefits to the Axis including keeping open the vital Swedish trade in metals and minerals as well as having the Baltic coastline being safe from allied landings opening more troops to defend other areas or more men for the frontlines.

Update- the Danish coastal city was named Hanstholm and the Norwegian city was named Kristiansand. Together these cities defenses shut the Baltic Sea off from the reach of the Allied navies.