This package is officially deprecated and has been superseded by the go-reader-* and go-writer-* packages, as well as go-whosonfirst-reader and go-whosonfirst-writer. In time this repository will be archived.
You will need to have both Go
(specifically version 1.12 or higher) and the make
programs installed on your computer. Assuming you do just type:
make tools
All of this package's dependencies are bundled with the code in the vendor
directory.
This package assumes a few things:
- You are using MySQL 5.7 or higher
- You have indexed a
whosonfirst
orgeojson
table (or both) using the go-whosonfirst-mysql package (or equivalent code) - The side-effect of
2
is that this package is still Who's On First (and not arbitrary GeoJSON) specific
./bin/wof-mysql-readerd -h
Usage of ./bin/wof-mysql-readerd:
-dsn string
-host string
The hostname to listen for requests on (default "localhost")
-port int
The port number to listen for requests on (default 8080)
-table string
The name of the MySQL table (indexed by go-whosonfirst-mysql) to query (default "geojson")
For example:
./bin/wof-mysql-readerd -dsn '{USER}:{PASSWORD}@/{DATABASE}' -port 7778
2018/05/03 16:53:57 listening for requests on localhost:7778
curl -s localhost:7778/102/547/905/102547905.geojson | jq '.properties["wof:name"]'
"Suvarnabhumi International Airport"