Skip to content

Commit

Permalink
update license and add license on the shapefile
Browse files Browse the repository at this point in the history
  • Loading branch information
meomancer committed Apr 29, 2020
1 parent 25426d7 commit 80de180
Show file tree
Hide file tree
Showing 8 changed files with 603 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -26,7 +26,8 @@ Development status: [![Stories in Ready](https://badge.waffle.io/healthsites/hea

# License

Data: [Open Database License](http://opendatacommons.org/licenses/odbl/)
Data: [Open Database License](http://opendatacommons.org/licenses/odbl/)<br>
Data credits : &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors <br>
Code: [Free BSD License](http://www.freebsd.org/copyright/freebsd-license.html)

Our intention is to foster widespread usage of the data and the code that we provide. Please use this code and data in the interests of humanity and not for nefarious purposes.
Expand Down
541 changes: 541 additions & 0 deletions django_project/api/LICENSE.txt

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions django_project/api/README.md
@@ -0,0 +1,32 @@
Provenance:

This data was generated as an extract from the OpenStreetMap global open database
(http://openstreetmap.org) by the Healthsites.io (http://healthsites.io) project.

Caveats:

This data is an extract from OpenStreetMap and may differ in part or substantially from the
current state of the upstream OpenStreetMap project. In particular, entities deleted in
OpenStreetMap may still be present in this extract, and changes to entities in OpenStreetMap
may not yet be reflected in this extract.

Healthsites.io provides these extracts as a convenience to people and organizations
interested in supporting access to healthcare. In addition to the provisions laid out
in the ODBL license, Healthsites.io takes no responsibility for any inadequacies in the
data provided here. All data is provided on a best effort basis.



Please make sure to credit the OpenStreetMap project whenever using this data using the text
in the 'data credits' section below. Although not required, we would appreciate it if you
additionally mention the HealthSites.io project (and link to our web site at http://healthsites.io) when citing this
data - it will help to support and publicise our work.

License:

Data: Open Database License http://opendatacommons.org/licenses/odbl/ - see accompanying LICENSE.txt
file for a complete copy of this license.
Data credits : © OpenStreetMap contributors (http://www.openstreetmap.org/copyright)

Our intention is to foster widespread usage of the data that we provide.
Please use this data in the interests of humanity and not for nefarious purposes.
Expand Up @@ -101,6 +101,13 @@ def country_data_into_shapefile(country=None):
except OSError:
pass

# copy the licenses
for license in settings.LICENSES:
name = os.path.basename(license)
shutil.copyfile(
license,
os.path.join(dir_shapefile, name))

zipf = zipfile.ZipFile(filename, 'w', allowZip64=True)
zipdir(dir_shapefile, zipf)
zipf.close()
Expand Down
Expand Up @@ -50,7 +50,7 @@ def handle(self, *args, **options):
try:
file = open(is_run_file, 'w+')
file.close()
except Exception as e:
except IOError as e:
pass

cache_data = get_statistic_cache(extent, country)
Expand All @@ -72,5 +72,7 @@ def handle(self, *args, **options):
file.write(json.dumps(statistic))
file.close()
os.remove(is_run_file) # remove run indicator
except IOError as e:
pass
except Exception as e:
print e
8 changes: 8 additions & 0 deletions django_project/core/base_static/css/map.css
Expand Up @@ -693,3 +693,11 @@ a.inner-navbar-brand:hover {
#fb-share {
cursor: pointer;
}

.leaflet-right {
display: block!important;
}

.credits {
display: none;
}
6 changes: 6 additions & 0 deletions django_project/core/settings/project.py
Expand Up @@ -126,6 +126,12 @@
CLUSTER_CACHE_MAX_ZOOM = 5
MAX_ZOOM = 18

# DATA LICENSE
LICENSES = [
ABS_PATH('api', 'LICENSE.txt'),
ABS_PATH('api', 'README.md')
]

# WHAT3WORDS API
WHAT3WORDS_API_POS_TO_WORDS = 'https://api.what3words.com/position?key=%s&lang=en&position=%s,%s'
DATABASE_ROUTERS = ['core.router.HealthsiteRouter']
Expand Down
6 changes: 4 additions & 2 deletions django_project/frontend/static/scripts/views/map/map.js
Expand Up @@ -16,10 +16,12 @@ define([
}

this.osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>',
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
});
this.aerial_map = L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {
attribution: 'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
attribution:
'Data &copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors <br>' +
'Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
});
this.MAP.addLayer(this.osm);

Expand Down

0 comments on commit 80de180

Please sign in to comment.