What is this water cap/valve for?
I'm not sure what the first one is, but you're probably right about it being a meter. Around there they're all inside. 

The second one is the city's shutoff for the branch to your home. You can see that it has a pentagonal nut, similar to what's on a fire hydrant. If you move out or quit paying your bill they use that to discontinue service. They're usually near the property line, though, so it's odd that yours is so close to the building.