Class: Geocoder::Result::PdokNl

Inherits:
Base
  • Object
show all
Defined in:
lib/geocoder/results/pdok_nl.rb

Instance Attribute Summary

Attributes inherited from Base

#cache_hit, #data

Instance Method Summary collapse

Methods inherited from Base

#initialize, #latitude, #longitude, #province_code

Constructor Details

This class inherits a constructor from Geocoder::Result::Base

Instance Method Details

#address_componentsObject



42
43
44
# File 'lib/geocoder/results/pdok_nl.rb', line 42

def address_components
  @data
end

#cityObject



26
27
28
# File 'lib/geocoder/results/pdok_nl.rb', line 26

def city
  @data['woonplaatsnaam']
end

#coordinatesObject



10
11
12
# File 'lib/geocoder/results/pdok_nl.rb', line 10

def coordinates
  @data['centroide_ll'][6..-2].split(' ').map(&:to_f).reverse
end

#countryObject



54
55
56
# File 'lib/geocoder/results/pdok_nl.rb', line 54

def country
  "Netherlands"
end

#country_codeObject



58
59
60
# File 'lib/geocoder/results/pdok_nl.rb', line 58

def country_code
  "NL"
end

#districtObject



30
31
32
# File 'lib/geocoder/results/pdok_nl.rb', line 30

def district
  @data['gemeentenaam']
end

#formatted_addressObject Also known as: address



14
15
16
# File 'lib/geocoder/results/pdok_nl.rb', line 14

def formatted_address
  @data['weergavenaam']
end

#postal_codeObject



50
51
52
# File 'lib/geocoder/results/pdok_nl.rb', line 50

def postal_code
  @data['postcode']
end

#provinceObject Also known as: state



20
21
22
# File 'lib/geocoder/results/pdok_nl.rb', line 20

def province
  @data['provincienaam']
end

#response_attributesObject



6
7
8
# File 'lib/geocoder/results/pdok_nl.rb', line 6

def response_attributes
  @data
end

#state_codeObject



46
47
48
# File 'lib/geocoder/results/pdok_nl.rb', line 46

def state_code
  @data['provinciecode']
end

#streetObject



34
35
36
# File 'lib/geocoder/results/pdok_nl.rb', line 34

def street
  @data['straatnaam']
end

#street_numberObject



38
39
40
# File 'lib/geocoder/results/pdok_nl.rb', line 38

def street_number
  @data['huis_nlt']
end