FromSpatialObject transforms a SpatialObject into the json.JSON type.
(so geopb.SpatialObject, numDecimalDigits int)
| 956 | |
| 957 | // FromSpatialObject transforms a SpatialObject into the json.JSON type. |
| 958 | func FromSpatialObject(so geopb.SpatialObject, numDecimalDigits int) (JSON, error) { |
| 959 | j, err := geo.SpatialObjectToGeoJSON(so, numDecimalDigits, geo.SpatialObjectToGeoJSONFlagZero) |
| 960 | if err != nil { |
| 961 | return nil, err |
| 962 | } |
| 963 | return ParseJSON(string(j)) |
| 964 | } |
| 965 | |
| 966 | // FromDecimal returns a JSON value given a apd.Decimal. |
| 967 | func FromDecimal(v apd.Decimal) JSON { |
nothing calls this directly
no test coverage detected