Class: ActiveRoad::OsmPbfImporter::Way

Inherits:
Object
  • Object
show all
Defined in:
app/models/active_road/osm_pbf_importer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id, nodes = [], car = false, bike = false, train = false, pedestrian = false, name = "", maxspeed = 0, oneway = false, boundary = "", admin_level = "", addr_housenumber = "", options = {}) ⇒ Way

Returns a new instance of Way.



263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'app/models/active_road/osm_pbf_importer.rb', line 263

def initialize(id, nodes = [], car = false, bike = false, train = false, pedestrian = false, name = "", maxspeed = 0, oneway = false, boundary = "", admin_level = "", addr_housenumber = "", options = {})
  @id = id
  @nodes = nodes
  @car = car
  @bike = bike
  @train = train
  @pedestrian = pedestrian
  @name = name
  @maxspeed = maxspeed
  @oneway = oneway
  @boundary = boundary
  @admin_level = admin_level
  @addr_housenumber = addr_housenumber
  @options = options
end

Instance Attribute Details

#addr_housenumberObject

Returns the value of attribute addr_housenumber.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def addr_housenumber
  @addr_housenumber
end

#admin_levelObject

Returns the value of attribute admin_level.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def admin_level
  @admin_level
end

#bikeObject

Returns the value of attribute bike.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def bike
  @bike
end

#boundaryObject

Returns the value of attribute boundary.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def boundary
  @boundary
end

#carObject

Returns the value of attribute car.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def car
  @car
end

#idObject

Returns the value of attribute id.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def id
  @id
end

#maxspeedObject

Returns the value of attribute maxspeed.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def maxspeed
  @maxspeed
end

#nameObject

Returns the value of attribute name.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def name
  @name
end

#nodesObject

Returns the value of attribute nodes.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def nodes
  @nodes
end

#onewayObject

Returns the value of attribute oneway.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def oneway
  @oneway
end

#optionsObject

Returns the value of attribute options.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def options
  @options
end

#pedestrianObject

Returns the value of attribute pedestrian.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def pedestrian
  @pedestrian
end

#trainObject

Returns the value of attribute train.



261
262
263
# File 'app/models/active_road/osm_pbf_importer.rb', line 261

def train
  @train
end

Instance Method Details

#add_node(id) ⇒ Object



279
280
281
# File 'app/models/active_road/osm_pbf_importer.rb', line 279

def add_node(id)
  @nodes << id
end

#marshal_dumpObject



283
284
285
# File 'app/models/active_road/osm_pbf_importer.rb', line 283

def marshal_dump
  [@id, @nodes, @car, @bike, @train, @pedestrian, @name, @maxspeed, @oneway, @boundary, @admin_level, @addr_housenumber, @options]
end

#marshal_load(array) ⇒ Object



287
288
289
# File 'app/models/active_road/osm_pbf_importer.rb', line 287

def marshal_load array
  @id, @nodes, @car, @bike, @train, @pedestrian, @name, @maxspeed, @oneway, @boundary, @admin_level, @addr_housenumber, @options = array
end