-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
92 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters