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