Name Date Size

..11-Feb-20204 KiB

.gitignoreH A D11-Feb-202071

CMakeLists.txtH A D11-Feb-20202.4 KiB

COPYINGH A D11-Feb-20201.3 KiB

docs/H11-Feb-20204 KiB

gc-couchbase/H11-Feb-20204 KiB

gc-couchdb/H11-Feb-20204 KiB

LICENSEH A D11-Feb-202011.1 KiB

MakefileH A D11-Feb-20202.5 KiB

README.mdH A D11-Feb-20203 KiB

rebarH A D11-Feb-2020156.6 KiB

rebar_couchbase.configH A D11-Feb-202039

rebar_couchdb.configH A D11-Feb-202044

vtree/H11-Feb-20204 KiB

wkb/H11-Feb-20204 KiB

README.md

1Welcome to the world of GeoCouch
2================================
3
4GeoCouch is a spatial extension for Couchbase and Apache CouchDB.
5
6
7For Couchbase
8-------------
9
10For compiling Couchbase (it includes GeoCouch), please see https://github.com/couchbase/tlm
11
12
13For Apache CouchDB
14------------------
15
16This version of GeoCouch needs at least Apache CouchDB 1.3.x.
17
18
19### Checkout the code
20
21First checkout the source code for Apache CouchDB into a directory that will
22be referred to as `<path-to-couchdb-source>`.
23
24Then checkout the GeoCouch source:
25
26    git clone https://github.com/couchbase/geocouch.git
27
28There's a new directory called `geocouch` created. From now on this directory
29will be referred to as `<path-to-geocouch-source>`.
30
31
32### Build instructions
33
34Make sure you have built Apache CouchDB from source including `make dev`. So
35go to your `<path-to-couchdb-source>` and run:
36
37    ./bootstrap
38    ./configure
39    make dev
40
41After that you can compile GeoCouch from within the GeoCouch directory:
42
43    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchdb
44
45Now copy the configuration file into your Apache CouchDB directory:
46
47    cp gc-couchdb/etc/couchdb/default.d/geocouch.ini <path-to-couchdb-source>/etc/couchdb/default.d/
48
49
50### Running Apache CouchDB
51
52Apache CouchDB needs the compiled geocouch in the include path. You can either copy `gc-couchdb` and `vtree` into `<path-to-couchdb-source>/src/` or set the `ERL_LIBS` environment variable to the GeoCouch root directory.
53
54    cd <path-to-couchdb-source>
55    ERL_LIBS="<path-to-geocouch-source>" ./utils/run
56
57
58### Running tests
59
60After you've followed the build instructions you can run the tests with
61
62    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchdb-check
63
64In order to run the JavaScript based tests, you need to start Apache CouchDB first:
65
66    cd <path-to-couchdb-source>
67    ERL_LIBS="<path-to-geocouch-source>" ./utils/run
68
69The tests can either be run from the command line or the browser.
70
71
72#### From command line
73
74From the command line the easiest way is to use the supplied runner script.
75From within the `<path-to-geocouch-source>`:
76
77    cd gc-couchdb
78    ./utils/runjstests.sh <path-to-couchdb-source>/test/javascript/run ./share/www/script/test
79
80
81#### From browser
82
83To run it from the browser first copy the JavaScript tests into the same directory as the other Apache CouchDB tests:
84
85    cp <path-to-geocouch-source>/gc-couchdb/share/www/script/test/* <path-to-couchdb-source>/share/www/script/test/
86
87Then add the tests to `<path-to-couchdb-source>/share/www/script/couch_tests.js`
88
89    loadTest("spatial.js");
90    loadTest("list_spatial.js");
91    loadTest("etags_spatial.js");
92    loadTest("multiple_spatial_rows.js");
93    loadTest("spatial_compaction.js");
94    loadTest("spatial_design_docs.js");
95    loadTest("spatial_bugfixes.js");
96    loadTest("spatial_offsets.js");
97    loadTest("spatial_range.js");
98
99
100### More information
101
102For more information and samples please see the [README in the gc-couchdb subdirectory](gc-couchdb/README.md).
103
104
105License
106-------
107
108GeoCouch is licensed under the Apache License 2.0.
109