README 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import_facilities.py is a Python 3 script to import specific data from a CKAN
  2. installation by the municipality of Umeå, Sweden. The file fetched is an XML
  3. file containing data about recreational facilities, such as its type, position
  4. and "materials" available.
  5. The data is then separated to individual facility directories and parsed into
  6. tab separated value files which are formatted for use with the OpenLayers web
  7. browser utilities available at http://openlayers.org/ (OpenLayers.Layer.Text)
  8. An important library which is used with this script is the Swedish Geoposition
  9. Converter by Arnold Andreasson (mellifica.se) and is available under the MIT
  10. License for free use. This is needed to convert the "SWEREF99 20 15" format of
  11. the supplied coordinates into regular SWEREF99 latitude and longitude format,
  12. which is essentially the same as the GPS standard system WGS84.
  13. INSTALLATION
  14. ------------
  15. If you have downloaded this code by cloning a git repository, it is likely you
  16. will have to initialise submodules to get external libraries:
  17. $ git submodule init && git submodule update
  18. RUNNING
  19. -------
  20. Running the import script will generate a subfolder 'facilities' that contains
  21. all of your geolocated facilities:
  22. $ python3 import_facilities.py
  23. The 'htdocs' folder then contains PHP5 scripts which are executed with the
  24. help of your webserver. Move the 'facilities' folder to your 'htdocs' root, or
  25. as this commands does, sync (or create) the newly updated data files there:
  26. $ rsync -avP facilities htdocs/
  27. Next use your web browser to visit whatever URL you setup with your webserver:
  28. $ www-browser http://localhost/