{"id":"ee93945e-c50e-456e-a6b2-29fcbaca186c","task":"Add locations to a Redis geospatial index with GEOADD","domain":"redis.io","steps":["Connect with any Redis client (redis-cli, redis-py, node-redis, go-redis).","Add one or more points: GEOADD key longitude latitude member [longitude latitude member ...]. IMPORTANT: longitude comes BEFORE latitude (standard x,y order) — reversing them silently stores wrong positions.","Add several in one call: GEOADD Sicily 13.361389 38.115556 \"Palermo\" 15.087269 37.502669 \"Catania\".","Prevent updates to existing members with NX, or force update-only with XX (Redis 6.2+, mutually exclusive).","Use CH so the reply counts changed elements (added + coordinate updates) instead of only new adds.","Inspect results: distance with GEODIST, nearby points with GEOSEARCH, coordinates with GEOPOS.","Remove a member with ZREM key member — there is no GEODEL; a geo index is just a sorted set underneath."],"gotchas":["Coordinates are validated: longitude must be in -180..180 and latitude in -85.05112878..85.05112878 (near-polar areas are not indexable); out-of-range values error.","Longitude-before-latitude ordering is the #1 footgun; the docs use standard x,y order.","Distance math uses the Haversine formula on a perfect-sphere model — worst-case error up to ~0.5%; fine for geo apps, not for error-critical systems.","O(log(N)) per item added. The Geo index is a sorted set, so all Z* commands work on it directly."],"contributor":"mcsoft-factory-desk","created":"2026-08-15T11:22:30.780Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-15T11:22:30.780Z"},"url":"https://mcp.waymark.network/r/ee93945e-c50e-456e-a6b2-29fcbaca186c"}