// FromWFS returns a Feature Collection from the WFS provided.
// This is a convenience method only and not intended for serious processing.
// This function does not currently support WFS layers with large numbers of features.
962351
func FromWFS(wfsURL, featureType string) (*FeatureCollection, error) {
	var (
		result   *FeatureCollection
		err      error
		request  *http.Request
		response *http.Response
		b        []byte
		ok       bool
	)

	v := url.Values{}
	v.Set("service", "wfs")
	v.Set("count", "9999")
	v.Set("outputFormat", "application/json")
	v.Set("version", "2.0.0")
	v.Set("request", "GetFeature")
	v.Set("typeName", featureType)

	qurl := wfsURL + "?" + v.Encode()

	if request, err = http.NewRequest("GET", qurl, nil); err != nil {
		return result, err
	}
	transport := &http.Transport{
		TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
	}

	httpClient := http.Client{Transport: transport}
	if response, err = httpClient.Do(request); err != nil {
		return result, err
	}

	defer response.Body.Close()
	b, _ = ioutil.ReadAll(response.Body)

	// Check for HTTP errors
	if response.StatusCode < 200 || response.StatusCode > 299 {
		return result, fmt.Errorf("Received %v: \"%v\" when performing a GetFeature request on %v\n%v", response.StatusCode, response.Status, qurl, string(b))
	}

	gjIfc, _ := Parse(b)
	if result, ok = gjIfc.(*FeatureCollection); ok {
		return result, nil
	}
	return result, fmt.Errorf("Did not receive valid GeoJSON on request %v", qurl)
}
145504
func (n node) From(addend ...string) Node {
	n.rootBucket = append(n.rootBucket, addend...)
	return &n
}
985664
func FromJSON(data *[]byte, current string, namespace *[]string) error {

	var m map[string]interface{}
	err := json.Unmarshal(*data, &m)

	if err != nil {
		return err
	}

	return FromMap(m, current, namespace)
}
60986
func (r *SearchRequest) From(from int) *SearchRequest {
	r.searchSource = r.searchSource.From(from)
	return r
}
168944
func (b *Blueprint) From(start uint8) *Transition {
	return (&Transition{blueprint: b}).From(start)
}
1081274
func (c *Client) FromString(targetPath, content string) (resource.Resource, error) {
	return c.rs.ResourceCache.GetOrCreate(resources.CACHE_OTHER, targetPath, func() (resource.Resource, error) {
		return c.rs.NewForFs(
			c.rs.FileCaches.AssetsCache().Fs,
			resources.ResourceSourceDescriptor{
				LazyPublish: true,
				OpenReadSeekCloser: func() (hugio.ReadSeekCloser, error) {
					return hugio.NewReadSeekerNoOpCloserFromString(content), nil
				},
				RelTargetFilename: filepath.Clean(targetPath)})

	})

}
105827
func From(table ...interface{}) *Dataset {
	ret := new(Dataset)
	ret.adapter = NewDefaultAdapter(ret)
	ret.clauses = clauses{
		Select: cols(Star()),
	}
	return ret.From(table...)
}
897679
func (t *Tle) FromJson(r io.Reader) error {
	return json.NewDecoder(r).Decode(&t)
}
766167
func (c *GroupsListCall) FromValues(v url.Values) error {
	var tmp GroupsListCall
	if raw := strings.TrimSpace(v.Get("exclude_archived")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "exclude_archived"`)
		}
		tmp.excludeArchived = parsed
	}
	if raw := strings.TrimSpace(v.Get("exclude_members")); len(raw) > 0 {
		parsed, err := strconv.ParseBool(raw)
		if err != nil {
			return errors.Wrap(err, `failed to parse boolean value "exclude_members"`)
		}
		tmp.excludeMembers = parsed
	}
	*c = tmp
	return nil
}
1239720
func FromFile(s string) *Graph {
	b, err := ioutil.ReadFile(s)
	if err != nil || len(b) == 0 {
		return nil
	}

	buf := bytes.NewBuffer(b)
	p := NewParser(buf)
	p.Ogdl()
	return p.Graph()
}
1063700
func (v *ServiceID) FromWire(w wire.Value) error {
	x, err := w.GetI32(), error(nil)
	*v = (ServiceID)(x)
	return err
}
710451
func FromObject(obj runtime.Object) error {
	switch t := obj.(type) {
	case *metav1.Status:
		return &StatusError{ErrStatus: *t}
	case runtime.Unstructured:
		var status metav1.Status
		obj := t.UnstructuredContent()
		if !reflect.DeepEqual(obj["kind"], "Status") {
			break
		}
		if err := runtime.DefaultUnstructuredConverter.FromUnstructured(t.UnstructuredContent(), &status); err != nil {
			return err
		}
		if status.APIVersion != "v1" && status.APIVersion != "meta.k8s.io/v1" {
			break
		}
		return &StatusError{ErrStatus: status}
	}
	return &UnexpectedObjectError{obj}
}
213193
func (ccpack *CDSPackage) InitFromFS(ccname string, ccversion string) ([]byte, *pb.ChaincodeDeploymentSpec, error) {
	return ccpack.InitFromPath(ccname, ccversion, chaincodeInstallPath)
}
1089206
func (a *BucketSortAggregation) From(from int) *BucketSortAggregation {
	a.from = from
	return a
}
1068662
func FromList(ls *[]volume.Volume, by By) By {
	return &fromList{by: by, ls: ls}
}
1046219
func (c *Container) FromDisk() error {
	jsonSource, err := os.Open(c.StatePath())
	if err != nil {
		return err
	}
	defer jsonSource.Close()

	dec := json.NewDecoder(jsonSource)
	return dec.Decode(c.state)
}
171663
func FromOptions(opts []yarpc.CallOption) []encoding.CallOption {
	newOpts := make([]encoding.CallOption, len(opts))
	for i, o := range opts {
		newOpts[i] = encoding.CallOption(o)
	}
	return newOpts
}