Every time someone searches "find a store near 90210," geocoding is working behind the scenes. It's the technology that converts addresses and place names into coordinates and it's what makes location-based search possible.
Related concepts: What is a store locator? | What is geofencing?
#Geocoding Definition
Geocoding is the process of converting human-readable addresses or place names into geographic coordinates (latitude and longitude).
Example:
- Input: "1600 Pennsylvania Avenue, Washington, DC"
- Output: 38.8977° N, 77.0365° W
The reverse process, converting coordinates to addresses, is called reverse geocoding.
#Why Geocoding Matters
#For Store Locators
When a customer searches "stores near Chicago":
- Geocoding converts "Chicago" to coordinates (41.8781° N, 87.6298° W)
- The system calculates distance from those coordinates to each store
- Results show stores nearest to that point
Without geocoding, the system would have no way to understand where "Chicago" is in relation to your stores.
#For Location Data
When you add a store at "123 Main Street, New York":
- Geocoding converts that address to coordinates
- Those coordinates place the store correctly on the map
- Distance calculations become possible
#The Coordinate System
Geographic coordinates use:
- Latitude: North/South position (-90° to +90°)
- Longitude: East/West position (-180° to +180°)
Together, they pinpoint any location on Earth with precision.
#How Geocoding Works
#The Geocoding Process
Step 1: Parse the Input
The system breaks down the address:
- Street number: 123
- Street name: Main Street
- City: New York
- State: NY
- Country: USA (assumed or specified)
Step 2: Normalize and Standardize
Address variations are handled:
- "St" → "Street"
- "NYC" → "New York"
- Common misspellings corrected
Step 3: Search Address Database
The geocoder searches its database:
- Street-level databases
- Building databases
- Place name databases
- Postal code databases
Step 4: Return Coordinates
The result includes:
- Latitude
- Longitude
- Confidence score
- Matched address (standardized)
- Additional metadata
#Geocoding Accuracy Levels
| Level | Precision | Example Use |
|---|---|---|
| Rooftop | Exact building | Store location |
| Point address | Street number | Customer search |
| Street | Street centerline | Approximate |
| Postal code | Area center | Low precision |
| City | City center | Broad search |
For store locators, you typically want rooftop or point-address accuracy.
#Types of Geocoding
#Forward Geocoding
Address → Coordinates
- "123 Main St, NYC" → 40.7484° N, 73.9857° W
- Most common for store locators
- Used when customers search or when adding store data
#Reverse Geocoding
Coordinates → Address
- 40.7484° N, 73.9857° W → "123 Main Street, New York, NY"
- Used for "what's near this point?"
- GPS-based "use my location" features
#Batch Geocoding
Many addresses at once
- Process thousands of addresses in bulk
- Used when importing store data
- More efficient than one-by-one
#Geocoding Services
#Google Maps Geocoding API
The most widely used:
- Excellent global coverage
- High accuracy
- Extensive address database
- Part of Google Cloud Platform
Pricing:
- First 10,000 requests per month free
- $5 per 1,000 in the first paid band, then $4, $3, $1.50, and $0.38 per 1,000 in higher-volume bands
Want to explore the free tier? Read our guide on how to use the Google Maps API free.
#Mapbox Geocoding API
Strong alternative:
- Good accuracy
- Beautiful map integration
- Competitive pricing
- Open data sources
Pricing:
- Temporary geocoding: first 100,000 requests per month free, then $0.75 per 1,000
- Permanent geocoding: no free tier; starts at $5 per 1,000
Learn more: How to use Mapbox API free and our Google Maps vs Mapbox comparison.
#Other Options
- HERE Geocoding: Enterprise-focused
- OpenCage: Open data based
- Nominatim: Free, open-source (OpenStreetMap)
- Pelias: Self-hostable
#Geocoding in Store Locators
Modern store locator platforms handle geocoding for you:
StoreRocket:
- Automatic geocoding when you add addresses
- Customer search geocoding built-in
- Geocoding on import is on us; your own map key powers the live map and search
- Both Google and Mapbox supported
You don't need to think about geocoding, it just works.
#Geocoding Challenges
#Address Ambiguity
Problem: Same address in different cities.
"123 Main Street" exists in thousands of cities. Without city/state context, geocoding fails.
Solution: Always capture complete addresses. Require city/state/zip minimum.
#Address Variations
Problem: Many ways to write the same address.
- "123 Main St"
- "123 Main Street"
- "123 Main St."
- "123 Main Street, Apt 4B"
Solution: Modern geocoders handle variations well. Normalize before storing.
#Non-Standard Addresses
Problem: Some locations don't have standard addresses.
- Rural areas
- New developments
- Industrial parks
- Some countries' addressing systems
Solution: Use coordinate input for locations without standard addresses.
#Moving Locations
Problem: Businesses move but coordinates don't update.
Solution: Re-geocode when addresses change. Verify coordinates periodically.
#International Addresses
Problem: Address formats vary globally.
- UK: Different postal code format
- Japan: Different address structure
- UAE: Often no street addresses
Solution: Use geocoders with strong international coverage. Accept local formats.
#Geocoding in Store Locator Implementation
#When You Add Stores
Process:
- You enter store address
- Geocoder converts to coordinates
- Coordinates stored in database
- Store appears correctly on map
With StoreRocket: This happens automatically. Enter an address, coordinates are generated.
#When Customers Search
Process:
- Customer enters "90210"
- Geocoder converts to coordinates (34.0901° N, 118.4065° W)
- System calculates distance to each store
- Results sorted by proximity
Speed matters: Geocoding must be fast. Customers expect instant results.
#Accuracy Considerations
For stores:
- Use complete, verified addresses
- Confirm pin placement on map
- Manually adjust if needed
For searches:
- Accept partial input (zip code alone works)
- Show "searching near [location]" confirmation
- Allow refinement if wrong
#Distance Calculation
Once you have coordinates, distance calculation uses the Haversine formula:
#The Haversine Formula
Calculates distance between two points on a sphere (Earth):
1a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlong/2)
2c = 2 × atan2(√a, √(1−a))
3distance = R × c
Where:
- R = Earth's radius (3,959 miles or 6,371 km)
- lat1, lat2 = latitudes in radians
- Δlat, Δlong = differences in coordinates
#In Practice
Store locator platforms handle this automatically. When you search, the system:
- Gets your search coordinates (geocoding)
- Calculates distance to each store (Haversine)
- Sorts results by distance
- Returns the nearest X stores
#Geocoding Best Practices
#For Store Data
Capture complete addresses:
- Street number and name
- City
- State/Province
- Postal code
- Country (for international)
Verify coordinates:
- Check pin placement after geocoding
- Manual correction if needed
- Re-verify periodically
Standardize format:
- Consistent address formatting
- No extra characters or line breaks
- One address per field
#For Customer Search
Accept flexible input:
- Zip code only
- City only
- Full address
- GPS coordinates
Confirm the match:
- "Showing results near [interpreted location]"
- Option to search again if wrong
Handle failures gracefully:
- "Location not found" message
- Suggestions for correction
- Default to broader search
#Frequently Asked Questions
#What is geocoding used for?
Geocoding converts addresses to coordinates, enabling:
- Store locators
- Delivery routing
- Map applications
- Location analytics
- Geographic data visualization
#Is geocoding the same as GPS?
No. GPS (Global Positioning System) determines your current location using satellites. Geocoding converts addresses to coordinates. They're related but different technologies.
#Why does geocoding sometimes fail?
Common reasons:
- Incomplete address
- Misspelled address
- New development not in database
- Non-standard addressing
- International format issues
#How accurate is geocoding?
Modern geocoders like Google Maps achieve rooftop-level accuracy in most developed areas. Rural or new areas may have lower precision.
#Do I need to understand geocoding to use a store locator?
No. Modern store locator platforms like StoreRocket handle all geocoding automatically. You just enter addresses; the system does the rest.
#Geocoding and Your Store Locator
Understanding geocoding helps you:
- Know why complete addresses matter
- Troubleshoot incorrect pin placement
- Appreciate what happens behind "find a store"
But you don't need to implement geocoding yourself.
StoreRocket handles geocoding automatically:
- Geocodes addresses when you add locations
- Geocodes customer searches instantly
- Supports Google and Mapbox
- Import geocoding is on us; your connected key runs the live map and search
Try StoreRocket Free for 7 Days →
Focus on your business. Let the technology handle the coordinates.
Technical questions about geocoding? Contact us.
Related: What is geofencing? | Google Maps vs Mapbox | How to add a store locator to your website | Store locator SEO guide