Skip to main content

Downloading shape files, CSV, linking into Google Earth etc

The map server allows access to WGS 84 and NZTM projections and can also output in many different formats with:

https://io.trap.nz/geo/trapnz-projects/wfs/apikey/project_id?service=WFS&version=1.0.0&request=GetFeature&typeName=layer&outputFormat=format

Output formats:

GML2

outputFormat=GML2

GML3

outputFormat=GML3

Shapefile

outputFormat=shape-zip

JSON

outputFormat=application/json

JSONP

outputFormat=text/javascript

CSV

outputFormat=csv

E.g to get a shapefile of trap locations:

https://io.trap.nz/geo/trapnz-projects/wfs/apikey/project_id?service=WFS&version=2.0.0&request=GetFeature&typeName=trapnz-projects:my-projects-traps&outputFormat=SHAPE-ZIP

https://io.trap.nz/geo/trapnz-projects/wfs/apikey/project_id?service=WFS&version=2.0.0&request=GetFeature&typeName=trapnz-projects:my-projects-traps&outputFormat=application/vnd.google-earth.kml+xml

CSV:

https://io.trap.nz/geo/trapnz-projects/wfs/apikey/project_id?service=WFS&version=2.0.0&request=GetFeature&typeName=trapnz-projects:my-projects-traps&outputFormat=csv

You can also view features directly in OpenLayers:

https://io.trap.nz/geo/trapnz-projects/wfs/apikey/project_id?service=WMS&version=1.1.0&request=GetMap&layers=trapnz-projects:my-projects&bbox=174.94,-41.5,174.95,-41&width=708&height=768&srs=EPSG:4326&format=application/openlayers

Notes:

The WFS server is set to return a maximum of 10k features per request.  If you have more that you will need use software  (eg ArCGIS Pro, or QuantumGIS) to page requests, or include count and startindex parameters . See the WFS specification.