Map feeds
Weedmanager provides a range of map feeds in OGC (Open Geospatial Consortium) formats which can be linked directly into GIS tools such as ArcGIS, Google Earth and Google Maps, QuantumGIS etc. To access the feeds you first need to generate an API key.
- Generating an API key
- Accessing map feeds
- Downloading shape files, CSV, linking into Google Earth etc
Generating an API key
In the My account section of Weedmanager, you can generate an API key that’s associated with your user account. It can only be used for map feeds (which are read-only), and it can be changed any time by generating a new key, which will disable any previously used keys.
Accessing map feeds
Map feed addresses are in the format:https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id
and https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id
for WFS and WMS feeds respectively.
The Project ID is the last part of the URL when you select your project in Weedmanager.
i.e. when you select the project after logging in, the URL will look something like https://weedmanager.nz/group/123456
, and in this case, the Project ID will be 123456.
Note: Some of the map feeds apply to all the projects you are a member of. If you are using those feeds, you still need to select a default project. It doesn’t matter which one.
So for a test user and project the WFS feed looks like this:https://io.weedmanager.nz/geo/wm/wfs/35GElj7FEyGB-gpalO5ptgcEjxmNe7QaOiJNbEPZmSU/123456
(you must generate your own key under the My Account section of the Weedmanager website)
You can paste these URLs into your GIS system and it will show you the available layers.
The layers currently available are:
- default-project-tracks
All tracks from the project specified in the URL - default-project-weeds-all-geometries
All current weeds from the project specified in the URL (combined geometries - only useful for GIS tools that can handle multiple geometry types) - default-project-weeds-linestrings
All current weed lines from the project specified in the URL - default-project-weeds-points
All current weed points from the project specified in the URL - default-project-weeds-polygons
All current weed polygons from the project specified in the URL - default-project-work-areas
Work areas from the project specified intheURL - my-projects-tracks
All tracks from the projects you have access to - my-projects-weeds-all-geometries
All current weeds from from the projects you have access to (combined geometries - only useful for GIS tools that can handle multiple geometry types) - my-projects-weeds-linestrings
All current weed lines from the projects you have access to. - my-projects-weeds-points
All current weed points from the projects you have access to - my-projects-weeds-polygons
All current weed polygons from the projects you have access to - my-projects-work-areas
Work areas from the projects you have access to
Notes
- The WFS server is set to return a maximum of 10k features per page request. Therefore you must set a page size value smaller than that. We suggest 5k to begin with.
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.weedmanager.nz/geo/wm/wfs/apikey/project_id?service=WFS&version=1.0.0&request=GetFeature&typeName=layer&outputFormat=format
Output formats:
GML2 |
|
GML3 |
|
Shapefile |
|
JSON |
|
JSONP |
|
CSV |
|
KML |
|
e.g. to get a shapefile of trap locations:
https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id?service=WFS&version=1.0.0&request=GetFeature&typeName=wm:default-project-weeds-points&outputFormat=shape-zip
KML (you can link this directly into Google Earth):
https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id?service=WFS&version=2.0.0&request=GetFeature&typeName=wm:default-project-weeds-points&outputFormat=application/vnd.google-earth.kml+xml
CSV:
https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id?service=WFS&version=2.0.0&request=GetFeature&typeName=wm:default-project-weeds-points&outputFormat=csv
You can also view features directly in OpenLayers:
https://io.weedmanager.nz/geo/wm/wfs/apikey/project_id?service=WMS&version=1.1.0&request=GetMap&layers=wm:default-project-weeds-points&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 to use software (e.g. ArcGIS Pro, or QuantumGIS) to page requests, or include count
and startindex
parameters . See the WFS specification.
The shapefile format has a number of limitations - see the Geoserver documentation. Datetime fields are not supported - only the date will be included.