Hi,
I'm using your library to convert some mongodb documents into postgis rows.
The way I do it is simple, with mongodb I decode the bson into a struct with map[string]interface{},
Then I use your library to convert the geojson part into ewkb.
But to do so I have to first use json.Marshal, because the Unmarshal method from geojson needs a json (in bytes) to Unmarshal it.
So it's Bson -> map[string]interface{} -> json -> Geometry
Would it be possible to use mapstructure to encode/decode (using maybe separate functions to not break the API), to prevent this kind of pattern?
It should be pretty simple from my very short experience with mapstructure in the past.
Hi,
I'm using your library to convert some mongodb documents into postgis rows.
The way I do it is simple, with mongodb I decode the bson into a struct with
map[string]interface{},Then I use your library to convert the geojson part into ewkb.
But to do so I have to first use json.Marshal, because the Unmarshal method from geojson needs a json (in bytes) to Unmarshal it.
So it's Bson -> map[string]interface{} -> json -> Geometry
Would it be possible to use mapstructure to encode/decode (using maybe separate functions to not break the API), to prevent this kind of pattern?
It should be pretty simple from my very short experience with mapstructure in the past.