Skip to main content

Posts

Showing posts with the label OGR

Mapping New Zealand: Clustering DOC Huts with Leaflet

In New Zealand, long distance walking or hiking for at least one overnight stay is known as tramping . There is a great network of over 950 huts throughout New Zealand operated by the Department of Conservation (DOC). I’ve just stayed in four of the huts while tramping the Abel Tasman Coast Track , and you need a lifetime to reach them all. It’s much quicker to map them. DOC huts in the Abel Tasman National Park . Awaroa Hut I was fortunate to visit the geospatial unit at the DOC office in Wellington. They have a lot of ineresting conservation projects going on, and it seemed to be a great place to work in New Zealand, especially when you can combine digital work with practical field work. You can download DOC's geospatial data for free on their data portal . Unfortunately, the datasets are not available as shapefiles, so it might require some wizardry to extract the data from KML. Luckily, the Koordinates guys have done this already, and you can download the shape...

Mapping New Zealand: Where are the hot and cold springs?

New Zealand has a large number of cold and hot springs , where water flows to the surface of the earth from underground. Where can you find these springs? This blog post will show you can visualise a spring point dataset on a Leaflet map.  You can find spring point dataset at LINZ Data Service , which contains 147 significant springs either by size or location. I downloaded the dataset as a shapefile, and converted it to GeoJSON using ogr2ogr : ogr2ogr -f "GeoJSON" -lco COORDINATE_PRECISION=4 nz-spring-points.json nz-spring-points-topo-150.shp  The resulting GeoJSON FeatureCollection can be assigned to a JavaScript variable: var springs = {"type":"FeatureCollection","features":[{... ... and visualised with Leaflet's GeoJSON layer and L.circleMarker : Here is the result: Fullscreen map Te WaikoropupÅ« Springs in Golden Bay, discharging 14,000 litres of water per second , - the largest freshwater springs in New...