Skip to content

GeoInterface v0.3.1

Compare
Choose a tag to compare
@yeesian yeesian released this 28 Jan 16:57
add implementation of shapecoords for AbstractGeometry

this is for packages implementing GeoInterface at the level of
AbstractGeometry, rather than the subtypes
AbstractPoint…AbstractMultiPolygon. They just need to define
`geotype(::AbstractGeometry)` in order for this package to identify
which geometry type it is, and return the corresponding coordinates.

We first define methods (`pointcoords()`,…,`multipolygoncoords()`) on
AbstractGeometry that returns the coordinates for different geometry
types. We can then have a `shapecoords(geom::AbstractGeometry)` that
uses `geotype(geom)` to look up the corresponding method to call