I don't find it the same. I learned classical guitar, then piano much later. Playing guitar, the hands have separate roles and the timing of your hands does not have to coordinate in the same way. Think about playing a fugue in the piano - there's really no equivalent on guitar.
There are of course challenges presented by guitar music that don't exist on the piano. Eg, there are multiple ways/positions to play the a given note on guitar, but exactly one on the piano.
Playing guitar with double-tapping and other similar methods does require coordination of hands that's similar to that in a piano, it would seem to me. But I'm not a pianist, so who knows.