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-20201.8 KiB

README.mdH A D11-Feb-20203.5 KiB

rebarH A D11-Feb-2020156.6 KiB

rebar_couchbase.configH A D11-Feb-202039

rebar_couchdb.configH A D11-Feb-202037

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
10### Checkout the code
11
12Check the code out with repo:
13
14    mkdir newvtree
15    cd newvtree
16    repo init -u git://github.com/couchbase/manifest.git -m toy/toy-newvtree.xml
17    repo sync
18
19
20### Build instructions
21
22Make sure you have built CouchDB from source including `make dev`. So
23go to your CouchDB directory and run:
24
25    ./bootstrap
26    ./configure
27    make dev
28
29After that you can compile GeoCouch from within the GeoCouch directory:
30
31    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchbase
32
33
34### Running tests
35
36After you've followed the build instructions you can run the tests with
37
38    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchbase-check
39
40
41For Apache CouchDB
42------------------
43
44This version of GeoCouch needs at least Apache CouchDB 1.3.x.
45
46
47### Checkout the code
48
49First checkout the source code for Apache CouchDB into a directory that will
50be referred to as `<path-to-couchdb-source>`.
51
52Then checkout the GeoCouch source:
53
54    git clone -b newvtree https://github.com/couchbase/geocouch.git
55
56There's a new directory called `geocouch` created. From now on this directory
57will be referred to as `<path-to-geocouch-source>`.
58
59
60### Build instructions
61
62Make sure you have built Apache CouchDB from source including `make dev`. So
63go to your `<path-to-couchdb-source>` and run:
64
65    ./bootstrap
66    ./configure
67    make dev
68
69After that you can compile GeoCouch from within the GeoCouch directory:
70
71    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchdb
72
73Now copy the configuration file into your Apache CouchDB directory:
74
75    cp gc-couchdb/etc/couchdb/default.d/geocouch.ini <path-to-couchdb-source>/etc/couchdb/default.d/
76
77
78### Running Apache CouchDB
79
80Apache 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.
81
82    cd <path-to-couchdb-source>
83    ERL_LIBS="<path-to-geocouch-source>" ./utils/run
84
85
86### Running tests
87
88After you've followed the build instructions you can run the tests with
89
90    COUCH_SRC=<path-to-couchdb-source>/src/couchdb make couchdb-check
91
92In order to run the JavaScript based tests, you need to start Apache CouchDB first:
93
94    cd <path-to-couchdb-source>
95    ERL_LIBS="<path-to-geocouch-source>" ./utils/run
96
97The tests can either be run from the command line or the browser.
98
99
100#### From command line
101
102From the command line the easiest way is to use the supplied runner script.
103From within the `<path-to-geocouch-source>`:
104
105    cd gc-couchdb
106    ./utils/runjstests.sh <path-to-couchdb-source>/test/javascript/run ./share/www/script/test
107
108
109#### From browser
110
111To run it from the browser first copy the JavaScript tests into the same directory as the other Apache CouchDB tests:
112
113    cp <path-to-geocouch-source>/gc-couchdb/share/www/script/test/* <path-to-couchdb-source>/share/www/script/test/
114
115Then add the tests to `<path-to-couchdb-source>/share/www/script/couch_tests.js`
116
117    loadTest("spatial.js");
118    loadTest("list_spatial.js");
119    loadTest("etags_spatial.js");
120    loadTest("multiple_spatial_rows.js");
121    loadTest("spatial_compaction.js");
122    loadTest("spatial_design_docs.js");
123    loadTest("spatial_bugfixes.js");
124    loadTest("spatial_offsets.js");
125    loadTest("spatial_range.js");
126
127
128License
129-------
130
131GeoCouch is licensed under the Apache License 2.0.
132