A coffee shop pinging your cell phone with a deal for latte when you’re 300 feet away? A mother alerted when her child leaves the school grounds? All this is done with “geofencing“, the latest thing in location-based services, according to some proponents and users.

Geofencing means setting up a virtual perimeter—the “fence” around a location, such as a restaurant. When people carrying cell phones cross that perimeter, the system becomes aware that they are physically nearby and can push information to the phones, for example, a list of today’s specials.

Companies like Shopkick, Loopt and Placecast are already providing geofencing-related services, but it’s still a largely unknown concept. As a colleague put it: “I first thought the fence meant that I am behind it, safe from interruptions and intrusions on my privacy.” Privacy is clearly a huge issue here. I tried to get a comment from the Electronic Frontier Foundation (known for defending the rights of users in the digital world) for this story, but they haven’t had enough information on geofencing yet to form an opinion.

Privacy concerns may lag behind the technology, but the point is to attempt the correct approach from the start.

“The last thing people want is somebody calling them, trying to sell something,” explains Tasso Roumeliotis, CEO of WaveMarket, a company providing geofencing services to applications developers and mobile operators. “The second-last is getting a text message trying to sell them something. Geofencing should always provide a service, not an ad. Sparse and high-quality, it must give people something they need or want, and are actively seeking.” (VentureBeat previously covered WaveMarket here.)

According to Roumeliotis, the key to geofencing is being transparent to users and providing ways to opt in and out of the services. This means explicitly telling users that a certain application is accessing their location and reminding them periodically that it is still active.

Maybe the first example — a local restaurant or retailer pushing an ad — doesn’t appeal to most users, but applications in personal security may find an audience. Whether it’s knowing that a child has left school and should be arriving home soon, or alerting people in a certain area of a looming natural disaster, geofencing can serve as a way to find people when absolutely necessary. And since cell phones can recognize velocity, such services can distinguish between someone in a car, who’s inside a “dynamic”, or moving, geofence and someone in a “static” geofence, such as a shopping mall. So a safety app would automatically turn a driver’s cell phone’s texting capabilities off and work only with voice command, so as not to interfere with the driving, especially significant where texting is already illegal.

Then again, geofencing can support entertainment and social apps such as gaming, or, as Roumeliotis suggests, dating.

“We set up a system in 2004 for a dating service with a Korean telecom company,” he says. “After a user signed up for the service, he or she was alerted when somebody matching the user’s profile was in the vicinity.” WaveMarket also works with game developers who have interesting ideas concerning geofencing in games, such as having different zones in the physical world that would give players more points or would power-up or give shelter in a battle and so forth. Other increasingly popular location-based services such as Foursquare or Gowalla have already turned sharing one’s location into a game, so it’s fair to assume that gaming applications of geofencing could do well in their niche.

Not all the problems of geofencing are related to privacy. Cell phones are notorious for inefficiency when it comes to battery life and GPS function.

“Background processing has been an issue with smartphones,” says Roumeliotis. “We’re trying to fix the client-side issues with more efficient software, and in the case of iPhone, we expect things to ease up with the introduction of iPhone OS 4 [which boosts background processing for Apple’s smartphones]. The server side presents its own problems, too: How do you build a scalable system that allows the tracking of maybe millions of data points?”

[This story is part of a weekly series on location-based services, written by VentureBeat’s JP Manninen. If you have an idea for a story you would like to see in this series, drop a line to jp@venturebeat.com]

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Learn more about membership.