OpenEcoMaps halfway back

For almost a year now, my pet project OpenEcoMaps has been broken. The vagaries of unreliable XAPI servers meant the system couldn’t download OpenStreetMap data to create all the KML files, and (I think) some changes to OpenLayers meant the web maps also stopped working. It has taken me a long time to work up the energy to fix these.

Today I can happily say one half of the system is now working again, and the underlying code is much improved.

OpenEcoMaps halfway back

OpenEcoMaps KML files, and now GeoJSON files, are being created again. Hooray! I switched from XAPI to the Overpass API; grabbed JSON which enabled me to write a more powerful function to turn this into usable objects (for example building a complete Python object for an allotment merging data from relevant nodes, ways and relations); wrote a new library to create GeoJSON files; refactored everything else to fit with these changes; and made numerous other small improvements.

You can browse, download and use the KML files and GeoJSON files with those links. To see an example, look at this KML file of low/zero carbon energy generators overlaid on Google Maps.

Now I just need to fix the web maps so you can see the lovely features on the main web site, and so people can easily embed the maps on their own web sites. I did dabble with using Leaflet before Christmas but I got stuck trying to get the icons to match styles defined in the GeoJSON file. I had a quick look at the OpenLayers code and quickly decided I had better things to do with my time! If anyone fancies giving it a go, the code is all in Github and is all released under the General Public License.