twpayne / go-geom

Package geom implements efficient geometry types for geospatial applications.
BSD 2-Clause "Simplified" License
841 stars 104 forks source link

encoding/wkb: new type Geom #178

Closed tbruyelle closed 4 years ago

tbruyelle commented 4 years ago

When the shape of a geometry isn't defined (for example when you use the GEOMETRY postgis type), you can't use the scanners defined in encoding/wkb, you have to iterate over the results and invoke wkb.Marshal on the column.

This change introduces a new type wkb.Geom which can scan any kind of geometry shape.

I've added NOTEs about details I would like to discuss, please review them.

I've also added new examples to illustrate the usage, tell me if the example names are OK for you.

twpayne commented 4 years ago

The PR looks good, there's just a bit of missing punctuation in a godoc comment. If you don't want to fix this I can fix it.

tbruyelle commented 4 years ago

The PR looks good, there's just a bit of missing punctuation in a godoc comment. If you don't want to fix this I can fix it.

fixed :)

twpayne commented 4 years ago

Thanks for this really nice contribution :)