The AI will count you as a land target if 8 (that's what I was told) of your tiles are adjacent to their tiles. Diagonal tiles count too. The AI will value land targets over "worst enemy" which in fact doesn't mean diddly squat when the AI is planning a war - it will instead heavily weight the fact that there's a potential roast bordering them.
How does one abuse this? Reminds me of our late Co-op da Whoop game, Dario, where we had the Stalin/Burger King combo as our northern borders. Stalin however settled so awkwardly that he actually left a tiny belt of jungle between his border and ours which meant that we never became a land target until very late in the game. Stalin doesn't value cultural buildings very high and we took care we didn't either just to avoid this. They did declare war but it wasn't on us but instead on another AI that was behind us. I don't think they would've "thought" twice if we had had a 8 tile border with them but since we didn't, they took other things into account.