User talk:H4ck3rm1k3/TagOntology

From OpenStreetMap Wiki
Jump to: navigation, search

How to update

   perl > ## generate a new wiki from the google doc
   git diff                   ## look at the diffs
   git commit -m "update" -a  ## commit them
   git push origin master     ## push 


This tool is to take the list of map features that sam has been compiling and be able to transform them into something new. in the process, I learned a bit about google spreadsheets. Amazing that they have such a verbose data format, the data is expanded about 10x bigger than any csv format, and you can get a feed for each cell. Anyway, I now have a perl script that will pull and parse this XML atom data feed of the spreadsheet. It creates currently a set of template instances which expand into some ugly html. That can be fixed without programming by changing the wiki template. If you want to generate different code, you can also do that without programming using the template toolkit! so it is easy for n00bs to use.

The plan is to create an XML schema, a stylesheet, sql tables and a rdf ontology based on this table, of course we need to understand it first.

See the resulting data here User:H4ck3rm1k3/TagOntology

See the template here how the html was produced

The source code is here:

The program downloads the xml from google docs and transforms it.

Optionally you can pass it a file, so without any parameters, it will download the file, otherwise it will use the given file.

I have checked in the example xml here :

And example of the output is here:

The template used is here :

The fields of the sheet are :

  • GeoNamesCode
  • GarminID
  • GarminFeatureDescription
  • KEY
  • Group
  • Code
  • Feature
  • Description
  • Comments

The generated code can be modified using the template toolkit :