whosonfirst / go-whosonfirst-api Goto Github PK
View Code? Open in Web Editor NEWGo package for working with Who's On First (Mapzen Places) API.
License: BSD 3-Clause "New" or "Revised" License
Go package for working with Who's On First (Mapzen Places) API.
License: BSD 3-Clause "New" or "Revised" License
wof-api -param api_key=mapzen-XXXXXX -param method=whosonfirst.places.getRandom -raw -param format=csv
Failed to call ‘whosonfirst.places.getRandom’ because strconv.Atoi: parsing “”: invalid syntax
And re-use all the code to generate stdout/outfile writers.
For example:
2017/07/17 21:58:14 Failed to retrieve https://whosonfirst.mapzen.com/data/219/309/339/219309339.geojson because 503 Slow Down
Easy enough to trigger with the -async
and -geojson(-ls)
flags
Leave it in place but issue a warning, prefer -feature-collection
instead since that's what it is and will be in sync with go-whosonfirst-index
This shouldn't be part of core and causes the entirety of the AWS Go libraries to be vendored.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x64a344]
goroutine 1 [running]:
github.com/whosonfirst/go-whosonfirst-api/client.(*HTTPClient).ExecuteMethod(0xc420625f20, 0x7fff568b882d, 0x19, 0xc4205729c8, 0x0, 0x0, 0x0, 0x0)
/usr/local/mapzen/go-whosonfirst-api/src/github.com/whosonfirst/go-whosonfirst-api/client/http.go:96 +0x6d4
github.com/whosonfirst/go-whosonfirst-api/client.(*HTTPClient).ExecuteMethodPaginated(0xc420625f20, 0x7fff568b882d, 0x19, 0xc42000e080, 0xc42015c300, 0xc420108cf0, 0x0)
/usr/local/mapzen/go-whosonfirst-api/src/github.com/whosonfirst/go-whosonfirst-api/client/http.go:152 +0x81
main.main()
/usr/local/mapzen/go-whosonfirst-api/cmd/wof-api.go:274 +0x1095
Specifically:
if IsMapzenError(status_code) {
rsp, err := mapzen.ParseMapzenResponse(http_rsp)
if err != nil {
msg := fmt.Sprintf("%d %s", rsp.Meta.StatusCode, rsp.Results.Error.Message)
return nil, errors.New(msg)
}
}
One string encoded Feature
per line. See also: issue #4
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.