Low commit activity in last 3 years
A long-lived project that still receives updates
This gem provides a data set of all swiss villages taken out of the "Ortschaftenverzeichnis" (https://data.geo.admin.ch/ch.swisstopo-vd.ortschaftenverzeichnis_plz/readme.txt)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.12
~> 12.0
~> 3.8
~> 0.74
~> 0.17
~> 2.1
 Project Readme

Build Status

Swiss Village Directory

This gem provides a data set of all swiss villages taken out of the "Ortschaftenverzeichnis" (ch.swisstopo-vd.ortschaftenverzeichnis_plz) The data set made available through a ruby object called Village contains the following fields.

  • Village name
  • Zip code
  • One digit spare
  • Municipal area/Commune
  • Canton
  • Latitude (WGS84)
  • Longitude (WGS84)

The data source can be downloaded as CSV here: PLZO_CSV_WGS84.zip

Installation

Add this line to your application's Gemfile:

gem 'swiss-village-directory'

And then execute:

$ bundle

Or install it yourself as:

$ gem install swiss-village-directory

Usage

Require the library

require 'swiss_village_directory'

Find by attributes:

SwissVillageDirectory.repository.find_all_by(name: 'Riedt b. Erlen')

or implement your own search logic

SwissVillageDirectory.villages.find { |v| v.name == 'Riedt b. Erlen' }

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rspec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

If you would like to contribute, you're very welcome to.

Please follow these instructions:

License

Copyright (c) 2016 Renuo AG

MIT License