Read SRS and axis orientation from data

Changing the metadata's projection to ProjectionLike type makes
this easier, and some changes to @bartvde's build fixes make the
code look more straightforward too.