For anyone who doesn't know about Swahili (or more generally, Bantu) noun classes, here's a short summary.
I've made a slightly more detailed table for my own purposes here, with a few corrections I've noticed need to be made along the way and the standard Bantu numbers down the side as well as other ad hoc systems that I come across and some notes for myself down the bottom that I've gleaned from elsewhere.
And then I saw that, depending on the verb, these can also mean "to or from". Ninaenda nyumbani "I'm going home", Ninatoka nyumbani "I'm coming from home."
There's a funny kink, however, in that not every noun can take this suffix. Proper nouns, for example, cannot, so there's no *Tanzaniani. You can simply say Tanzania and it means the same thing. Ninatoka Tanzania "I come from Tanzania." If you really need to make it clear, you can place a basically classifying noun before the proper noun and give it the locative suffix, so Ninatoka nchini Tanzania "I come from (the country) Tanzania." (country-LOC).
At this stage, it still seemed like a case to me ... but I couldn't make sense of why there are these "locative noun classes" in the tables or how their agreement particles could work. I think I get it now and I can kind of see how this is not a case, but I still feel uncomfortable saying it's "not a case" because it does what is usually done by case, just in a kind of different way.
So, the three locative classes are apparently:
pa- (16) exact, specific, proximate location
ku- (17) general, inexact, distant location, direction
mu- (18) internal location, along
When we add the locative suffix -ni, it essentially derives a locative-class noun from it, but it is ambiguous as to exactly which locative class it belongs to. To distinguish them, you need to see some agreement.
House, on its own is a 9/10 noun, meaning you need agreement to distinguish plural and singular anyway.
- nyumba yangu
ny-umba y-angu
9/10-house(s) 9-GEN.1s
My house
nyumba zangu
ny-umba z-angu
9/10-house(s) 10-GEN.1s
My houses
- chumba changu
ch-umba ch-angu
7-room 7-GEN.1s
My room
vyumba vyangu
vy-umba vy-angu
8-room 8-GEN.1s
My room
- *chumbani changu
*ch-umba-ni ch-angu
7-room-LOC 7-GEN.1s
At/in/to/from my room
- chumbani kwangu
ch-umba-ni kw-angu
7-room-LOC 17-GEN.1s
"at/to/from my room"
chumbani mwangu
ch-umba-ni mw-angu
7-room-LOC 18-GEN.1s
"inside/into/out of my room"
It's often said that the noun mahali "place" (and it's dia/idiolectal variants mahala, pahali, pahala) is the sole noun in class 16 and that class 17 and 18 don't have any nouns of their own. I've also read that this is a fairly arbitrary thing to say and that many nouns are inherently locative, such as all place names. I'm not sure I quite believe that though, since, for example, saying "the place is good/nice/beautiful" and "Tanzania is good/nice/beautiful" is quite different.
- Tanzania ni nzuri
Tanzania ni ny-zuri
Tanzania COP 9/10-good
Tanzania is good.
Mahali ni pazuri
mahali ni pa-zuri
place.16 COP 16-good
One way I've seen it explained is that -ni doesn't mark something as a syntactical location, as a role in the sentence, but essentially means "place", so "nyumba" is "a house as a physical structure" and "nyumbani" is "a house place". So, if you ask me what I think of your house, I think I could answer:
- ninaipenda
ni-na-i-pend-a
1sg-PRES-9-like-INDIC
I like it (as a thing)
ninapapenda
ni-na-pa-pend-a
1sg-PRES-18-like-INDIC
I like it (as a location)
- Ninapapenda hapa.
ni-na-pa-pend-a
1sg-PRES-18-like-INDIC PROX.18
- ... kuingia nyumbani mwa watu bila kualikwa ...
ku-ingi-a ny-umba-ni mw-a wa-tu bila ku-alik-w-a
INF-enter-INDIC 9/10-house-LOC 18-GEN 2-people without INF-invite-PASS-INDIC
walking into people's homes uninvited
- nina
ni-na
1sg-with
I have
nilikuwa na
ni-li-ku-wa na
1sg-PST-INF-be with
I had
kuna
ku-na
17-with
there is ... (in general)
kulikuwa na
ku-li-ku-wa na
17-PST-INF-be with
there was ... (in general)
pana
pa-na
16-with
there is ... (at an exact location)
palikuwa na
ku-li-ku-wa na
17-PST-INF-be with
there was ... (at an exact location)
mna
m(u)-na
18-with
there is ... (inside something)
mlikuwa na
m(u)-li-ku-wa na
18-PST-INF-be with
there was ... (inside something)
- Vitabu vipo mezani.
vi-tabu vi-po meza-ni
8-books 8-be.LOC.16 table-LOC
The books are on the table.
Pana vitabu mezani
pa-na vi-tabu meza-ni
16-with 8-books table-LOC
There are books on the table.
Vitabu vimo chumbani.
vi-tabu vi-mo ch-umba-ni
8-books 8-be.LOC.18 7-room-LOC
The books are in the room.
Mna vitabu chumbani
m-na vi-tabu ch-umba-ni
16-with 8-books 7-room-LOC
There are books in the room.