incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Volker Mische <>
Subject Re: GeoCouch weird issue / won't index
Date Thu, 18 Nov 2010 11:02:11 GMT
Hi Keith,

I only had a quick look, but the bounding box you are requesting seems to be
outside your data. Try something like bbox=-180,-90,180,90


Am 18.11.2010 04:16 schrieb "Keith Gable" <>:

I'm trying out GeoCouch right now and I'm coming across something I've
been banging my head on for an hour or two now. I got the examples to
work, but I can't get anything to actually work with my real data.

Here is my spatial function (which is design_doc["spatial"]["geocode"]
in case I have it in the wrong spot, but it DOES run, so I doubt this):

function(doc) {
 if (doc['couchrest-type'] == 'Place') {
 if (doc['geo'] && doc['geo'].length == 2) {
  log('geo on ' + doc['_id'] + ' = ' + doc['geo'][0] + ',' +
doc['geo'][1] );
  emit({ type: "Point", coordinates: [ doc['geo'][0],
doc['geo'][1] ] }, doc['_id']);
 } else {
  log('no geo on ' + doc['_id']);

Here is one of the documents:
  "_id": "000c02eb-3372-4071-b56d-928f154a3357",
  "_rev": "4-5a1c3fe5d45fd164c6dc4216672d3f58",
  "address": "710 E Ben White Blvd",
  "title": "McDonald's",
  "alcohol": [
  "postal_code": "78704",
  "url": "",
  "human_id": null,
  "fare": [
      "Fast Food",
  "created_by": "_system",
  "tags": [
  "bitly_hash": null,
  "atmosphere": null,
  "parking": null,
  "geo": [
  "phone_number": "(512) 707-6838",
  "couchrest-type": "Place",
  "reservations": null,
  "credit_cards_accepted": [
  "features": [
      "Kid Friendly"
  "updated_by": "_system",
  "path": [
  "hours": null,
  "description": null,
  "owned_by": "_system"

The correct coordinates get outputted by my log() functions, but it
seems like nothing gets emitted.

This spatial query returns nothing:


The log isn't really entirely helpful either since it doesn't seem to
tell me if there was a problem with the GeoJSON. I'm running version
"1.1.0a771dd47-git" (latest version as of a few minutes ago).

Any tips to help diagnose this? Maybe I've just made a stupid mistake
and it's going to be a simple fix... :)

Thanks for any help anyone can provide.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message