get_NZ_coastlines¶
- nzgeom.coastlines.get_NZ_coastlines(include_chatham_islands=False, include_kermadec_islands=False, bbox=(None, None, None, None))[source]¶
return a geopandas.GeoDataFrame containing the NZ coastline.
The reasoning behind the options to exclude the Chatham Islands and Kermadec islands: The Chatham Islands and the Kermadec Islands sit east of 180 degrees E longitude. When plotting the full contents of the New Zealand coastlines dataset some plotting packages’ default options (e.g. matplotlib) produce a horizontal axis spanning the full range of longitudes in the dataset: roughly -177 deg E to 177 deg E. This produces a plot with the Chathams and Kermadecs as a small spec at 177 deg E on the far right and the rest of New Zealand as a marginally larger spec at -177 deg E on the far left, and blank space everywhere else. The default options to
get_NZ_coastlines()allow plotting the North and South Islands of New Zealand in a more useful way using default plotting options.- Parameters:
include_chatham_islands (
bool) – if true, include the coastline of the Chatham Islands in the returned geodataframe.include_kermadec_islands (
bool) – if true, include the coastline of the Kermadec Islands in the returned geodataframe.bbox (
Tuple[float,float,float,float]) – optional 4-tuple of floats specifying a bounding box. If specified, the coastlines will be clipped to the bounding box. The box is specified in form [LL lon, LL lat, UR lon, UR lat ]. LL = lower left, UR = upper right.
- Return type:
GeoDataFrame- Returns:
a geopandas.GeoDataFrame object containing multipolygons representing New Zealand’s coastlines.