Closed thisisaaronland closed 3 years ago
As in a go-whosonfirst-readwrite/writer:
go-whosonfirst-readwrite/writer
func write_feature(body []byte, wr writer.Writer) (string, error) { rsp := gjson.GetBytes(body, "properties.wof:id") if !rsp.Exists() { return "", errors.New("Missing wof:id") } wof_id := rsp.Int() path, err := uri.Id2RelPath(wof_id) if err != nil { return "", err } r := bytes.NewReader(body) fh := ioutil.NopCloser(r) err = wr.Write(path, fh) if err != nil { return "", err } return path, nil }
No longer relevant, as this is handled and wrapped by go-whosonfirst-writer.
go-whosonfirst-writer
As in a
go-whosonfirst-readwrite/writer
: