Skip to content

Commit ee2ea86

Browse files
committed
remove dig from cli
1 parent cc60ac7 commit ee2ea86

File tree

3 files changed

+77
-14
lines changed

3 files changed

+77
-14
lines changed

README.md

Lines changed: 74 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,48 @@
44

55
A simple tool for solving common geospatial workflows.
66

7-
* wms: Web Mapping Server (tile server)
8-
* mbt: Tile builder for vector tiles into the mbtiles spec
7+
* [wms](#wms): Web Mapping Server (tile server)
8+
* [mbt](#mbt): Tile builder for vector tiles into the mbtiles spec
99
* fence: A geofence utility
1010
* dig: A geocoder based on OSM data
1111

1212
This project is under heavy development and APIs/CLIs are subject to change until further notice.
1313

14+
## Installation
15+
16+
Install diglet into /usr/local/bin (assuming you have permissions to) like so
17+
18+
curl -sSL https://raw.githubusercontent.com/buckhx/diglet/master/scripts/install.py | sudo python - /usr/local/bin
19+
20+
If you don't have permission at /usr/local/bin, try something like this where you extend your PATH
21+
22+
BINDIR=~/diglet
23+
mkdir -p $BINDIR
24+
export PATH=$PATH:$BINDIR
25+
curl -sSL https://raw.githubusercontent.com/buckhx/denv/master/scripts/install.py | python - $BINDIR
26+
27+
If you just want the binary, the final arg to the install py is a directory to download into
28+
29+
Or do it manually by going to the releases page and download the diglet artifact https://github.com/buckhx/diglet/releases/latest
30+
31+
Currently only building 64 bit linux for simplicity, but will build for more archs as things stabilize.
32+
Instructions for [building](#building)
33+
1434
# wms
1535

1636
A real-time tile server in a single binary
1737

1838
Here are some neat things that diglet wms does
1939

20-
* Backend changes are pushed to the front end in real time
21-
* Currently changes are registered from the kernel (inotify/kqueue/ReadDirectoryChangesW)
22-
* Sniffs the tile format
23-
* (pbf, json, gz, jpg, png, etc...)
24-
* Source specific hooks in the works
25-
* (on PostGIS insert -> build mbtiles)
40+
* Read-through mmap LRU cache
41+
* Easy peasy-lemon squeezy HTTPS
42+
* Sniffs the tile format and set Content-Type: (pbf, json, gz, jpg, png, etc...)
2643
* HTTP/JSON-RPC/WS endpoints
27-
* All packaged up in an itty-bitty binary
44+
45+
Some things in the works
46+
47+
* Backend changes are pushed to the front end in real time (via websockeys)
48+
* Source specific hooks (on PostGIS insert -> build mbtiles)
2849

2950
## Usage
3051

@@ -74,9 +95,25 @@ Get information about the specific tileset. This information is populated from t
7495
Get the tile at the given coordinates and return the contents as the response body.
7596
Passing json=true as a will return the tile as a json object with it's coordinates
7697

98+
###Gallery
99+
100+
GET /tileset/gallery/{tileset-slug}
101+
102+
A simple gallery to view your tiles with. Only supports vector tiles for now. ?lat={}&lon={}&zoom{} will zoom to desired location.
103+
77104
#mbt
78105

79-
More info to come, but here's the current help message
106+
Will build tiles from either geojson or a csv.
107+
108+
If a csv is used, either --csv-lat/--csv-lon or --csv shape must be set to read the coordinates correctly.
109+
The csv-shape is a list of list of [[],[],[]] and will only render a single, exterior ring polygon per line.
110+
Csv also requires a named header.
111+
112+
Geojson is fair-game, no support for GeometryCollection or Topojson
113+
114+
--filter if included will only include these columns in this properties. Includes all if not added
115+
116+
Valid extentsions for mbtiles are .mbtiles or .mbt
80117

81118
```
82119
NAME:
@@ -98,13 +135,18 @@ OPTIONS:
98135
--extent "4096" Extent of tiles to be built. Default is 4096
99136
--max, --max-zoom "10" Maximum zoom level to build tiles for
100137
--min, --min-zoom "5" Minimum zoom level to build tiles from
101-
--filter Only include fields keys in this comma delimited list. EXAMPLE --filter name,date,case_number,id NOTE all fields are lowercased and non-word chars replaced with '_'
138+
--filter Only include fields keys in this comma delimited list
102139
--csv-lat Column containing latitude
103140
--csv-lon Column containint longitude
104141
--csv-shape Column containing geometry in geojson-like 'coordinates' form
105142
--csv-delimiter ","
106143
```
107144

145+
#fence & dig
146+
147+
I did a geofencing experiment and may or may not include that in the standard build.
148+
Also did some geocoding work from OSM. Hit's ~500 r/s, but unstable so won't be included for now.
149+
108150
## Releases
109151

110152
Diglet uses a go library for reading mbtiles that depends on some C code, this makes
@@ -118,6 +160,25 @@ We'll include a script and or directions for building on your own.
118160

119161
#### Major releases will have platform specific binaries
120162

163+
## Building
164+
165+
Here are the basics, but you can inspect the .travis.yml for specifics
166+
167+
Prereqs
168+
169+
* [go installed](https://golang.org/doc/install#install), preferably 1.4+
170+
* gcc access
171+
* go get github.com/buckhx/diglet
172+
* cd into diglet
173+
174+
```
175+
CGO_ENABLED=1
176+
go test -v ./...
177+
go get ./...
178+
go generate
179+
go build -ldflags '-extldflags "-static"'
180+
```
181+
121182
## Some food for thought
122183

123184
##### A tile is a girls best friend
@@ -147,3 +208,5 @@ Here are dependencies and their licenese
147208
* gorilla: BSD 3-Clause
148209
* mattn/go-sqlite3: MIT
149210
* go-std-lib: BSD 3-Clause
211+
212+
I got lazy and haven't maintained the licenses...

cli.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package main
44
import (
55
"os"
66

7-
"github.com/buckhx/diglet/dig"
7+
//"github.com/buckhx/diglet/dig"
88
"github.com/buckhx/diglet/mbt"
99
"github.com/buckhx/diglet/resources"
1010
"github.com/buckhx/diglet/util"
@@ -23,7 +23,7 @@ func client(args []string) {
2323
app.Commands = []cli.Command{
2424
wms.Cmd,
2525
mbt.Cmd,
26-
dig.Cmd,
26+
//dig.Cmd,
2727
}
2828
app.Flags = []cli.Flag{
2929
cli.BoolFlag{

dig/quarry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func testQuarryExcavate(t *testing.T) {
2626
q.Dig(addr)
2727
}
2828

29-
func TestDig(t *testing.T) {
29+
func testDig(t *testing.T) {
3030
q, err := dig.OpenQuarry(NY_DIG)
3131
if err != nil {
3232
t.Error(err)

0 commit comments

Comments
 (0)