Git Product home page Git Product logo

osmfc's Introduction

OpenStreetMap Flashcards Generator

A flashcard generator based on OpenStreetMap data.

Will someday double as an Anki plugin, if I don't get distracted before that.

Usage

Invoke osmfc.py to generate an Anki deck file with proof-of-concept flashcards:

$ ./osmfc.py -v "Strasbourg grande ile"
[...some expected warnings from prettymaps...]
INFO:root:Found 16 features matching the given tags
[...some expected warnings from prettymaps...]
INFO:root:Created a note for OSM feature W26306273: "Hôtel de Ville""
INFO:root:Created a note for OSM feature W30922600: "Église Saint-Étienne""
INFO:root:Created a note for OSM feature W39224041: "Aubette""
INFO:root:Created a note for OSM feature W39540475: "Église protestante Saint-Pierre-le-Jeune""
INFO:root:Created a note for OSM feature W39550485: "Maison Spach""
INFO:root:Created a note for OSM feature W39605815: "Hôtel des Deux Ponts""
INFO:root:Created a note for OSM feature W39609222: "Hôtel de la Préfecture""
INFO:root:Created a note for OSM feature W39611079: "Hôtel de Dartein""
INFO:root:Created a note for OSM feature W39643856: "Maison Saré""
INFO:root:Created a note for OSM feature W39656819: "Foyer de l'Etudiant Catholique""
INFO:root:Created a note for OSM feature W39907377: "Ancienne douane""
INFO:root:Created a note for OSM feature W39971183: "Chambre de Commerce et d'Industrie""
INFO:root:Created a note for OSM feature W39973703: "Église protestante Saint-Thomas""
INFO:root:Created a note for OSM feature W287247607: "Opéra du Rhin""
INFO:root:Created a note for OSM feature R3575: "Palais Rohan""
INFO:root:Created a note for OSM feature R3541088: "Cathédrale Notre-Dame""
INFO:root:attaching files: []
INFO:root:Wrote a deck of 32 cards (in 16 notes) to output.apkg

In its current proof-of-concept state, the tool only builds anki cards for the given area's buildings that are protected on a national level (OSM features with heritage=2). For each of these, it create two cards: one asking the user where the building is on a map of the area, and one showing the same map with the building highlighted and asking what its name is.

"Strasbourg grande ile" Question Answer
Where is [...]? Screenshot for the question "Where is Opéra du Rhin?" Screenshot for the answer to "Where is Opéra du Rhin?"
What is this? Screenshot for one "What is this?" question kind Screenshot for the answer to "What is this?" about the Cathédrale Notre-Dame

TODO

  • try reduce space usage by rasterizing most of the map and keeping only the highlighted features as SVG
  • make the code more testable
  • allow zooming on the feature with a single click
  • build cards for some "obvious" object types like streets (warning: some are split into multiple ways);
  • build PDF cards;
  • make it a proper Python package;
  • make it an anki plugin (while still supporting stand-alone use);
  • build cards according to custom user queries;

Libraries used:

osmfc's People

Contributors

dettorer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.