You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fc := `{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[122.993197,41.117725],[122.999399,41.115696],[122.99573,41.109516],[122.987146,41.106994],[122.984775,41.107699],[122.990687,41.117878],[122.993197,41.117725]]]},"properties":{}}]}`
_, err := geoencoding.Decode([]byte(fc), geoencoding.GeoJSON)
fmt.Println(err)
report error: geojson: not a feature: type=FeatureCollection
I thought the correct should be if strings.Contains(string(s[9:26]), "FeatureCollection") {
rather than if strings.Contains(string(s[9:20]), "FeatureCollection") {
The text was updated successfully, but these errors were encountered:
report error:
geojson: not a feature: type=FeatureCollection
I thought the correct should be
if strings.Contains(string(s[9:26]), "FeatureCollection") {
rather than
if strings.Contains(string(s[9:20]), "FeatureCollection") {
The text was updated successfully, but these errors were encountered: