In this particularly case, it’s mostly situated in the US, just Canadian citizens are allowed to use the entrance and return the same way without going through customs.
Generally speaking, it varies, but I’ve seen most often that the legal location is where the front door is. Things like utilities are so location specific either it follows the border or more likely they’ve worked something out a long time ago.
The only place I know where an international border goes through houses is Baarle Hertog/Nassau, Belgium/Netherlands. From what I understand, in that city a house belongs to (is taxed by) the country where the front door is.
International borders going though houses are probably rare, but it’s much more common if you look at things like counties. There, too, it’s usually the front door that defines it.
From Wikipedia re. the Belgian enclave H7 in Baarle-Nassau:
Boundary runs through two dwellings, including the middle of one front door (giving it two house numbers: Loveren 2, Baarle-Hertog / Loveren 19, Baarle-Nassau).
So the front door disambiguation fails for at least one person. Not that such situations are common worldwide, for obvious reasons.
In the Chicago area there is a light rail system based in Indiana that crosses the state line and operates in Illinois, one end of the line ending at Millennium Station in the Loop. So it’s not just St. Louis. But unquestionably it’s an Indiana rail road that operates in Illinois and not a joint venture.
Since Belgium and Netherlands are both in the Schengen area, the illegal immigrant thing is not an issue. You’ll be legal/illegal in both countries no matter where the door is.
However, I understand that some houses have two front doors: one they use and one boarded up. The one they use is in the country with the lower property tax rates. If the rates change, they switch which front door they use. Not sure how they get away with this, but I recall seeing a picture of such a house.
I recall reading about some business where an international border goes right through the establishment. Unfortunately, I can’t recall all the details. It was in the Balkans, Serbia-Croatia, I think. The place was either a nightclub or restaurant. Don’t remember the name of the town. While Yugoslavia was in existence, there were no problems with the internal border, but after the breakup, things got kind of interesting there. I tried to find it, but google fu is weak today.
I’m curious what the basis is for that determination. In the US there’s the local zoning code and building code. The building code dictates things like fire ratings depending on proximity to the property line and other buildings, but the zoning code dictates how close buildings can be to said property lines. The proximity to other buildings across a property line is usually moot, unless setback averaging is used, such that if all your surrounding neighbors’ homes are shifted to the left side of the lot, then yours needs to be similarly shifted. The thing is, that only applies if those neighboring properties are in the same zoning category. An international border would pretty certainly change the zoning at that line. Also, in Europe there’s not nearly as much pearl-clutching over buildings being “too close” to one another. Even in tiny villages, they’re regularly touching side-to-side.
I cannot find any link, but I read an article (with a picture) of a small rural house that straddles the border between Estonia and Russia. One corner of the house is in Russia. That corner has no door or other features - all the doors and windows are in Estonia. The picture showed some kind of tape or marking that the border authorities had attached to the house at the points where the national border intersected the walls.