Here's the way Gaza Population was mapped since 1995. I'm sure of the details since I served in the unit that created this system:
Every worker that wanted to enter Israel had to have a magnetic card, to be renewed one a year. This card was in addition to a valid ID and a usual permit obtained by the employer, it had one and only reason, to force any Gaza resident that plans to walk in Israel (a potential source of danger) to come to a specific goverment center and have his picture taken once a year.
The center was civillian, with only 4 soliders as guards.
While I admit that having to renew a useless card once a year is a pain, it is much more humane than being pulled out of home at night.
So the army can find humane solutions that don't compermise security.