If these are like the previous LOTR Keycaps, they should be compatible with any + shaped Cherry MX style switches. I'm not familiar with the Logitech G215, I couldn't find any google results either. Closest i could find was the G213, which looks like a membrane keyboard with rubber domes under the keys. I would assume these keycaps would not be compatible with that keyboard.
Pizza_Parker_64The G512 looks like it could have 2 different style switches. You'd have to see which type you have. If it has a skinny little + shaped stem, those are the GX switches. Those should be compatible with this keycap or any other Cherry MX compatible keycaps. If, however, you have little hollow box shaped switches, those are the Romer G switches, which are specific to Logitech and would not be compatible.