 _ = require 'underscore'
 URL = require 'url'
 mongoose = require 'mongoose'
+util = require 'util'
 
 parser = new xml2js.Parser()
 

                x: parseFloat coords[0], 10
                y: parseFloat coords[1], 10

        aCamera.save (err) ->
            if err then console.log """Could not save camera #{i}:



Error: #{err}"""

            if isLast
                CameraModel.count {}, (err, count) ->
                    console.log "Saved #{count} cameras successfully."
                    mongoose.disconnect()

fs.readFile 'data/raw/trafficcameraswithfeed.kml', (err, data) ->
    if err then console.log err else parser.parseString data
