Closed mbn18 closed 2 years ago
No. When you're unmarshaling GeoJSON you don't know what type of geometry you will get, so you have to check afterwards.
@twpayne , how should I check the result?
You can use a type assertion in its two-valued form.
This fail at compile
With error:
The only way I could do it was using type hint:
Is there a way to make the
geojson.Unmarshal
to work withMultiPoint
? (or other geom).