         return @stream.point(a, b)
   )
 
+  clip = d3.geo.clipExtent()
+
   path = d3.geo.path()
-      .projection(simplify)
+      .projection(stream: (s) -> simplify.stream(clip.stream(s)))
 
   svg = d3.select('body').append('svg')
 

    width = parseInt(d3.select('body').style('width'))
    height = parseInt(d3.select('body').style('height'))

    projection.scale(s0 = d3.min([width / boxWidth, height / boxHeight]))
    f0 = (db.bbox[2] - db.bbox[0]) / boxWidth / s0


    for ring in contourLayer
      continue if ring.properties.elevation % 300
      length = turf.lineDistance(ring, 'kilometers') * (s0 * sc) / PXKM
      contours.append('text')
          .attr('class', 'contour-label')
          .append('textPath')
            .attr('xlink:href', "#contour-#{ring.id}")
            .attr('startOffset', "50%")
            .text(ring.properties.elevation)

  renderSymbols = ->
    symbols.selectAll('.symbol').remove()
