diff --git a/.coveragerc b/.coveragerc index b6bd0d4a6..7b43e2de1 100644 --- a/.coveragerc +++ b/.coveragerc @@ -3,7 +3,7 @@ omit = */migrations/*, api/renderers.py, */__init__.py, */admin.py [report] -exclude_lines = +exclude_lines = # Have to re-enable the standard pragma pragma: no cover @@ -18,7 +18,7 @@ exclude_lines = # Don't complain if non-runnable code isn't run: if 0: if __name__ == .__main__.: - + except ImportError: ^pass$ diff --git a/.travis.yml b/.travis.yml index bd246414f..6abac0f60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,14 @@ notifications: email: false - + language: python python: - "2.7" - + addons: postgresql: "9.4" - + before_install: - sudo apt-get install -y libspatialite5 libspatialite-dev - sudo apt-get install -y python-software-properties @@ -19,7 +19,7 @@ before_install: - sudo apt-get install -y gdal-bin libgdal-dev - export CPLUS_INCLUDE_PATH=/usr/include/gdal - export C_INCLUDE_PATH=/usr/include/gdal - + before_script: - psql -U postgres -c "create extension postgis" - createuser hot --superuser --createdb -U postgres @@ -32,4 +32,3 @@ script: ./manage.py test - \ No newline at end of file diff --git a/README.md b/README.md index 03935d49d..03756d74f 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ To update source language (English) for Django templates run: To update source language for javascript files run: `python manage.py makemessages -d djangojs -l en` - + then, push the new source files to the Transifex service, it will overwrite the current source files @@ -259,11 +259,11 @@ or for javascript files: Once there are some translation updates, pull the latest changes for mapped resources - + For a specific language(s): `tx pull -l fr,hr` - + For all languages: `tx pull` diff --git a/api/hdm_presets.xml b/api/hdm_presets.xml index a9f6c7bbd..ebbc3fd06 100644 --- a/api/hdm_presets.xml +++ b/api/hdm_presets.xml @@ -1,5 +1,5 @@ - - - @@ -247,9 +247,9 @@ - - - - + - - - + @@ -996,7 +996,7 @@ + - - - - - - + diff --git a/api/osm_presets.xml b/api/osm_presets.xml index 25bcf400d..39b1a4dd9 100644 --- a/api/osm_presets.xml +++ b/api/osm_presets.xml @@ -4812,7 +4812,7 @@ - + @@ -8436,7 +8436,7 @@ - + HOT Export Tool{% endblock %} - +
diff --git a/api/tests/files/Example Transform.sql b/api/tests/files/Example Transform.sql index 357cb7733..936e81d8a 100644 --- a/api/tests/files/Example Transform.sql +++ b/api/tests/files/Example Transform.sql @@ -1,6 +1,6 @@ ---renommage des tables -ALTER TABLE planet_osm_point RENAME TO old_planet_osm_point; -ALTER TABLE planet_osm_line RENAME TO old_planet_osm_line; +--renommage des tables +ALTER TABLE planet_osm_point RENAME TO old_planet_osm_point; +ALTER TABLE planet_osm_line RENAME TO old_planet_osm_line; ALTER TABLE planet_osm_polygon RENAME TO old_planet_osm_polygon ; --creation des nouvelles tables avec colonnes en Francais @@ -34,13 +34,13 @@ CREATE TABLE planet_osm_point( tourisme VARCHAR (80), velo VARCHAR (80), voie VARCHAR (80) - ); + ); ---creation de la colonne spatiale dans la table point -SELECT AddGeometryColumn('planet_osm_point', 'the_geom', 3857, 'POINT', 'XY'); +--creation de la colonne spatiale dans la table point +SELECT AddGeometryColumn('planet_osm_point', 'the_geom', 3857, 'POINT', 'XY'); --copie des données de la table source renommée dans la nouvelle -INSERT INTO planet_osm_point ( +INSERT INTO planet_osm_point ( the_geom, acces, artificiel, @@ -69,9 +69,9 @@ INSERT INTO planet_osm_point ( tourisme, velo, voie - ) + ) -SELECT +SELECT Geometry, access, man_made, @@ -123,10 +123,10 @@ CREATE TABLE planet_osm_line ( velo VARCHAR (80), voie VARCHAR (80) ); - -SELECT AddGeometryColumn('planet_osm_line', 'the_geom', 3857, 'LINESTRING', 'XY'); -INSERT INTO planet_osm_line ( +SELECT AddGeometryColumn('planet_osm_line', 'the_geom', 3857, 'LINESTRING', 'XY'); + +INSERT INTO planet_osm_line ( the_geom, acces, artificiel, @@ -144,9 +144,9 @@ INSERT INTO planet_osm_line ( sensunique, tourisme, velo, - voie -) -SELECT + voie +) +SELECT Geometry, access, man_made, @@ -167,7 +167,7 @@ SELECT highway FROM old_planet_osm_line ; - + CREATE TABLE planet_osm_polygon ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, @@ -195,7 +195,7 @@ CREATE TABLE planet_osm_polygon ( tourisme VARCHAR (80), voie VARCHAR (80) ); - + SELECT AddGeometryColumn('planet_osm_polygon', 'the_geom', 3857, 'MULTIPOLYGON', 'XY'); INSERT INTO planet_osm_polygon ( @@ -223,9 +223,9 @@ INSERT INTO planet_osm_polygon ( sport, tourisme, voie - ) + ) -SELECT +SELECT Geometry, access, man_made, @@ -250,12 +250,12 @@ SELECT sport, tourism, highway - -FROM old_planet_osm_polygon ; + +FROM old_planet_osm_polygon ; -DROP TABLE old_planet_osm_point ; +DROP TABLE old_planet_osm_point ; DROP TABLE old_planet_osm_line ; DROP TABLE old_planet_osm_polygon ; ---fin \ No newline at end of file +--fin \ No newline at end of file diff --git a/api/tests/files/example_translation.txt b/api/tests/files/example_translation.txt index 1fea23a4e..3b14c4eb0 100644 --- a/api/tests/files/example_translation.txt +++ b/api/tests/files/example_translation.txt @@ -285,7 +285,7 @@ office=architext architecte office=association association office=compagnie entreprise office=educational_institution établissement d'enseignement -office=employment_agency +office=employment_agency office=estate_agent agence immobilière office=foundation fondation office=government administration gouvernementale diff --git a/api/tests/files/hdm_presets.xml b/api/tests/files/hdm_presets.xml index 5cfbb47be..b0316426f 100644 --- a/api/tests/files/hdm_presets.xml +++ b/api/tests/files/hdm_presets.xml @@ -1,5 +1,5 @@ - - - @@ -247,9 +247,9 @@ - - - + @@ -652,7 +652,7 @@ + - - - - - - + diff --git a/jobs/admin.py b/jobs/admin.py index b7f5a7320..00765ba87 100644 --- a/jobs/admin.py +++ b/jobs/admin.py @@ -9,27 +9,27 @@ class HOTRegionGeoAdmin(OSMGeoAdmin): - + model = Region exclude = ['the_geom', 'the_geog'] - + def save_model(self, request, obj, form, change): #pragma no cover geom_merc = obj.the_geom_webmercator obj.the_geom = geom_merc.transform(ct=4326, clone=True) obj.the_geog = GEOSGeometry(obj.the_geom.wkt) obj.save() - + class JobAdmin(OSMGeoAdmin): search_fields = ['uid', 'name', 'user__username'] list_display = ['uid','name', 'user'] exclude = ['the_geom', 'the_geog'] - + class ExportConfigAdmin(admin.ModelAdmin): search_fields = ['uid', 'name', 'user__username'] list_display = ['uid', 'name', 'user', 'config_type'] - - + + admin.site.register(Region, HOTRegionGeoAdmin) admin.site.register(Job, JobAdmin) admin.site.register(ExportConfig, ExportConfigAdmin) diff --git a/jobs/migrations/africa.geojson b/jobs/migrations/africa.geojson index 69cddee38..5d4648b2f 100644 --- a/jobs/migrations/africa.geojson +++ b/jobs/migrations/africa.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:02:05.793112+00", "updated_at": "2015-05-26 11:02:05.793124+00", "id": 1, "uid": "c5d55b6e-73c0-4c0d-87af-c4c74afb6a15", "name": "Africa", "description": "African region", "the_geom": "SRID=4326;POLYGON((-9.22851562371569 35.529991054642,-2.02148437471857 36.2420580205995,5.3613281242538 37.7859107720549,12.9199218732018 37.0880488550818,16.2597656227365 34.0867866515334,25.4003906214639 34.0867866515334,34.013671870265 31.8752252711323,35.4199218700698 25.5597872474067,41.0449218692867 15.8741672389277,43.5058593689438 11.9506623519819,51.7675781177936 12.9804713316873,53.349609367574 6.57457460509422,54.9316406173535 -25.564742723554,39.638671869482 -32.4750121350142,16.9628906226384 -36.9520867134414,7.64648437393565 -23.8079624912308,7.47070312396013 -11.2673058688303,-14.677734372957 3.42294984575739,-20.4785156221497 10.9169208943394,-28.2128906210724 16.5493289332331,-16.4355468727122 32.0243777047473,-9.22851562371569 35.529991054642))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -9.228515623715689, 35.529991054641961 ], [ -2.021484374718568, 36.242058020599472 ], [ 5.361328124253804, 37.785910772054933 ], [ 12.919921873201785, 37.088048855081773 ], [ 16.259765622736484, 34.086786651533444 ], [ 25.400390621463874, 34.086786651533444 ], [ 34.013671870265057, 31.875225271132301 ], [ 35.419921870069764, 25.559787247406671 ], [ 41.044921869286753, 15.874167238927676 ], [ 43.505859368943852, 11.950662351981903 ], [ 51.767578117793647, 12.980471331687337 ], [ 53.34960936757404, 6.574574605094224 ], [ 54.931640617353537, -25.564742723553987 ], [ 39.638671869482053, -32.475012135014204 ], [ 16.96289062263838, -36.952086713441361 ], [ 7.646484373935652, -23.807962491230771 ], [ 7.470703123960132, -11.26730586883032 ], [ -14.677734372956984, 3.422949845757386 ], [ -20.478515622149679, 10.916920894339412 ], [ -28.212890621072368, 16.549328933233141 ], [ -16.43554687271218, 32.024377704747266 ], [ -9.228515623715689, 35.529991054641961 ] ] ] } } ] diff --git a/jobs/migrations/burma.geojson b/jobs/migrations/burma.geojson index 43ee905e4..efca03f21 100644 --- a/jobs/migrations/burma.geojson +++ b/jobs/migrations/burma.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:10:50.689019+00", "updated_at": "2015-05-26 11:10:50.689032+00", "id": 5, "uid": "524f3869-0763-4764-b245-13d935cd1caa", "name": "Burma", "description": "Burmese Region", "the_geom": "SRID=4326;POLYGON((91.3623046747761 21.040927784596,92.3291015496456 23.2388223763033,93.4716796744881 24.4846489964522,94.5263671743351 26.1135197267554,94.8339843617924 27.1349241036336,96.9433593615044 28.2632632763163,97.3388671739481 28.8037667717894,99.0087890487186 28.9961295335546,99.7558593611084 26.6646413451382,98.6132812362659 24.684456830263,100.063476548566 23.0367702155953,100.327148423534 22.266222280853,101.689453110838 22.1034540951873,101.689453110838 20.6302138149958,99.7119140486196 19.5986067189677,98.2617187363199 18.6436427044717,99.1406249861939 16.7598378215092,99.2724609236781 15.2815356592402,100.283203111036 12.1655407877562,99.8876952985926 10.3554495667282,99.0087890487186 9.53304035512141,97.6904296738941 9.01258966978831,96.7236327990336 9.96614548177713,97.0751952989796 12.7662677664175,96.9873046739931 14.7722267212101,95.2294921742451 14.4745748223016,93.6914062369589 13.7073670000662,92.6367187371029 14.0060314573373,92.4169921746321 16.1698348953706,93.2080077995196 17.4738123746352,92.5488281121164 19.3500194791206,91.3623046747761 21.040927784596))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 91.362304674776155, 21.040927784595961 ], [ 92.329101549645657, 23.23882237630335 ], [ 93.471679674488158, 24.484648996452197 ], [ 94.526367174335149, 26.11351972675536 ], [ 94.833984361792417, 27.134924103633573 ], [ 96.943359361504392, 28.263263276316337 ], [ 97.338867173948131, 28.803766771789363 ], [ 99.008789048718654, 28.996129533554651 ], [ 99.755859361108392, 26.664641345138246 ], [ 98.613281236265905, 24.684456830263041 ], [ 100.063476548565646, 23.036770215595293 ], [ 100.32714842353414, 22.26622228085299 ], [ 101.6894531108384, 22.103454095187278 ], [ 101.6894531108384, 20.630213814995781 ], [ 99.711914048619633, 19.598606718967705 ], [ 98.261718736319892, 18.643642704471727 ], [ 99.140624986193899, 16.759837821509215 ], [ 99.272460923678139, 15.281535659240177 ], [ 100.2832031110364, 12.165540787756163 ], [ 99.887695298592632, 10.355449566728165 ], [ 99.008789048718654, 9.533040355121413 ], [ 97.690429673894158, 9.01258966978831 ], [ 96.723632799033638, 9.966145481777129 ], [ 97.075195298979665, 12.766267766417542 ], [ 96.987304673993151, 14.772226721210094 ], [ 95.229492174245124, 14.474574822301635 ], [ 93.691406236958898, 13.707367000066164 ], [ 92.636718737102896, 14.006031457337313 ], [ 92.416992174632156, 16.169834895370585 ], [ 93.208007799519649, 17.473812374635173 ], [ 92.548828112116396, 19.350019479120554 ], [ 91.362304674776155, 21.040927784595961 ] ] ] } } ] diff --git a/jobs/migrations/central_asia.geojson b/jobs/migrations/central_asia.geojson index 13b8c3bf9..845ca05a2 100644 --- a/jobs/migrations/central_asia.geojson +++ b/jobs/migrations/central_asia.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:09:20.910084+00", "updated_at": "2015-05-26 11:09:20.910097+00", "id": 4, "uid": "6e0ed346-82e9-4b86-bb0c-2419a6c322eb", "name": "Central Asia\/Middle East", "description": "Central Asia\/Middle East Region", "the_geom": "SRID=4326;POLYGON((22.0605468719292 32.6925545325517,22.7636718718311 22.428801361538,35.0683593701184 20.7946337866483,37.5292968697763 20.4656160177049,42.8027343690419 12.380245636861,47.724609368357 12.7234051705861,57.9199218669377 15.4510329227357,63.1933593662033 19.8054700290496,68.8183593654203 22.428801361538,71.6308593650288 24.0439557512474,73.7402343647354 26.5860710033595,75.849609364442 32.3961967146332,76.9042968642953 33.5757264421055,73.7402343647354 37.8553385849975,78.3105468640991 40.0423349135168,85.6933593630713 43.9592135834531,87.099609362876 45.7042612045559,93.0761718620444 43.1951649796945,102.216796860775 41.6380257344781,111.005859359551 41.3747475516809,119.794921858327 43.4509250026993,122.255859357985 46.9183793190876,120.498046858228 50.8458387637482,107.841796859992 53.643009637317,95.1855468617474 53.8509064494876,83.5839843633647 51.7253268628364,80.0683593638543 53.8509064494876,76.5527343643439 56.2662358406645,63.5449218661547 57.2300163798083,57.9199218669377 53.8509064494876,47.724609368357 52.5880321319494,44.5605468687971 46.4359640750595,37.8808593697268 41.9002327636308,31.9042968705585 43.705608029204,28.0371093710976 42.9383285236181,26.2792968713424 39.7726585205698,27.6855468711462 35.027747290603,22.0605468719292 32.6925545325517))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 22.060546871929176, 32.692554532551718 ], [ 22.763671871831075, 22.428801361538035 ], [ 35.068359370118365, 20.794633786648312 ], [ 37.529296869776353, 20.465616017704882 ], [ 42.802734369041957, 12.38024563686097 ], [ 47.724609368357044, 12.723405170586087 ], [ 57.919921866937734, 15.451032922735696 ], [ 63.193359366203332, 19.805470029049587 ], [ 68.818359365420321, 22.428801361538035 ], [ 71.630859365028826, 24.043955751247445 ], [ 73.740234364735414, 26.586071003359503 ], [ 75.849609364442003, 32.396196714633241 ], [ 76.904296864295318, 33.575726442105477 ], [ 73.740234364735414, 37.855338584997476 ], [ 78.310546864099109, 40.042334913516846 ], [ 85.693359363071309, 43.959213583453149 ], [ 87.099609362875995, 45.704261204555863 ], [ 93.076171862044404, 43.195164979694503 ], [ 102.216796860775375, 41.638025734478084 ], [ 111.005859359551366, 41.374747551680954 ], [ 119.794921858327356, 43.450925002699343 ], [ 122.255859357985358, 46.918379319087578 ], [ 120.498046858228349, 50.845838763748219 ], [ 107.841796859992371, 53.64300963731705 ], [ 95.185546861747383, 53.850906449487638 ], [ 83.583984363364721, 51.72532686283644 ], [ 80.068359363854313, 53.850906449487638 ], [ 76.55273436434392, 56.266235840664535 ], [ 63.544921866154731, 57.230016379808319 ], [ 57.919921866937734, 53.850906449487638 ], [ 47.724609368357044, 52.588032131949383 ], [ 44.560546868797154, 46.435964075059523 ], [ 37.880859369726849, 41.900232763630839 ], [ 31.904296870558465, 43.705608029204036 ], [ 28.037109371097568, 42.938328523618161 ], [ 26.279296871342368, 39.772658520569856 ], [ 27.685546871146169, 35.027747290602989 ], [ 22.060546871929176, 32.692554532551718 ] ] ] } } ] diff --git a/jobs/migrations/create_hstore_extension.py b/jobs/migrations/create_hstore_extension.py index cd4376b30..39362bc65 100644 --- a/jobs/migrations/create_hstore_extension.py +++ b/jobs/migrations/create_hstore_extension.py @@ -2,11 +2,11 @@ from django.db import models, migrations class Migration(migrations.Migration): - + dependencies = [ ('jobs', '0001_initial'), ] - + operations = [ HStoreExtension(), ] \ No newline at end of file diff --git a/jobs/migrations/indonesia.geojson b/jobs/migrations/indonesia.geojson index eb0e76128..7c0128d49 100644 --- a/jobs/migrations/indonesia.geojson +++ b/jobs/migrations/indonesia.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:05:07.784755+00", "updated_at": "2015-05-26 11:05:07.784766+00", "id": 2, "uid": "c726eadf-31d4-4f4c-aa8d-7d0ee7e1140d", "name": "Indonesia, Sri Lanka, and Bangladesh", "description": "Indonesia, Sri Lanka, and Bangladesh", "the_geom": "SRID=4326;POLYGON((80.7714843637562 31.1258481568142,90.7910156123594 27.6032368910179,90.9667968623414 20.8767767249506,95.1855468617474 13.8354130552998,100.942382798449 2.41353151156956,103.271484360622 1.13975636623652,104.897460922895 0.524589838432593,107.490234360037 0.920065435701001,108.63281248488 1.88656087145436,109.59960935974 1.00794361221889,111.445312484484 0.56853315039229,113.68652342168 1.05188182415698,116.059570296343 2.19398267534795,116.499023421284 3.42294984575873,127.133789044804 4.25602935358595,136.538085918494 -0.134582395755139,140.932617167882 -2.68243019103434,140.493164042941 -8.80093971117635,135.043945293706 -10.101374137769,126.694335919862 -10.9654607021886,118.696289045974 -13.0286418171276,106.391601547693 -9.84168554809311,95.9326171741461 -5.74990684551552,90.5712890498886 7.40332403879689,78.7060546765437 4.51892830326432,78.7060546765437 8.62175657184491,81.0791015512134 10.9600677829888,89.0771484251001 17.1801550411554,89.3408203000632 20.835710858162,87.9345703002594 25.0433038916098,81.6943359261279 26.782395443524,78.9697265515069 28.3406475498084,80.7714843637562 31.1258481568142))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 80.771484363756215, 31.125848156814239 ], [ 90.791015612359402, 27.60323689101795 ], [ 90.966796862341397, 20.87677672495062 ], [ 95.185546861747383, 13.83541305529983 ], [ 100.942382798448634, 2.413531511569558 ], [ 103.271484360622381, 1.139756366236515 ], [ 104.897460922895135, 0.524589838432593 ], [ 107.490234360037363, 0.920065435701002 ], [ 108.632812484879878, 1.886560871454358 ], [ 109.599609359740384, 1.007943612218886 ], [ 111.445312484483878, 0.56853315039229 ], [ 113.686523421680121, 1.051881824156976 ], [ 116.059570296342628, 2.193982675347949 ], [ 116.499023421284122, 3.422949845758735 ], [ 127.133789044803606, 4.256029353585953 ], [ 136.53808591849409, -0.13458239575514 ], [ 140.932617167882086, -2.682430191034344 ], [ 140.493164042940606, -8.800939711176349 ], [ 135.043945293705605, -10.101374137769003 ], [ 126.694335919862112, -10.965460702188592 ], [ 118.696289045973629, -13.028641817127625 ], [ 106.39160154769263, -9.841685548093112 ], [ 95.932617174146131, -5.749906845515523 ], [ 90.571289049888648, 7.403324038796888 ], [ 78.706054676543758, 4.51892830326432 ], [ 78.706054676543758, 8.621756571844911 ], [ 81.079101551213455, 10.960067782988764 ], [ 89.077148425100148, 17.180155041155388 ], [ 89.340820300063257, 20.835710858161981 ], [ 87.934570300259452, 25.043303891609792 ], [ 81.694335926127962, 26.782395443523992 ], [ 78.969726551506866, 28.340647549808413 ], [ 80.771484363756215, 31.125848156814239 ] ] ] } } ] diff --git a/jobs/migrations/insert_export_formats.py b/jobs/migrations/insert_export_formats.py index 36e709084..6688bc1c2 100644 --- a/jobs/migrations/insert_export_formats.py +++ b/jobs/migrations/insert_export_formats.py @@ -8,7 +8,7 @@ class Migration(migrations.Migration): - + def insert_export_formats(apps, schema_editor): ExportFormat = apps.get_model('jobs', 'ExportFormat') ExportFormat.objects.create(name='OBF Format', description='OSMAnd OBF', diff --git a/jobs/migrations/install_default_group.py b/jobs/migrations/install_default_group.py index dfd400786..ec75e5762 100644 --- a/jobs/migrations/install_default_group.py +++ b/jobs/migrations/install_default_group.py @@ -6,8 +6,8 @@ from jobs.models import ExportProfile class Migration(migrations.Migration): - - + + def insert_default_group(apps, schema_editor): """ Set up the default group and group profile. @@ -20,13 +20,13 @@ def insert_default_group(apps, schema_editor): max_extent=2500000, group=group ) - - + + dependencies = [ ('jobs', 'install_region_mask'), ] - - + + operations = [ migrations.RunPython(insert_default_group), ] diff --git a/jobs/migrations/install_region_mask.py b/jobs/migrations/install_region_mask.py index 7fcc63108..c90d161e9 100644 --- a/jobs/migrations/install_region_mask.py +++ b/jobs/migrations/install_region_mask.py @@ -4,13 +4,13 @@ from django.db import models, migrations class Migration(migrations.Migration): - - + + dependencies = [ ('jobs', '0012_auto_20150908_1226'), ] - - + + operations = [ migrations.RunSQL('DROP VIEW IF EXISTS region_mask;'), migrations.RunSQL("""CREATE OR REPLACE VIEW region_mask AS diff --git a/jobs/migrations/load_regions.py b/jobs/migrations/load_regions.py index c193c929f..b00192742 100644 --- a/jobs/migrations/load_regions.py +++ b/jobs/migrations/load_regions.py @@ -9,10 +9,10 @@ from django.contrib.gis.gdal import DataSource class Migration(migrations.Migration): - + def insert_regions(apps, schema_editor): Region = apps.get_model('jobs', 'Region') - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/africa.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -23,7 +23,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/burma.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -34,7 +34,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/central_asia.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -45,7 +45,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/indonesia.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -56,7 +56,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/philippines.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -67,7 +67,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + ds = DataSource(os.path.dirname(os.path.realpath(__file__)) + '/south_america.geojson') layer = ds[0] geom = layer.get_geoms(geos=True)[0] @@ -78,7 +78,7 @@ def insert_regions(apps, schema_editor): the_geom=the_geom, the_geog=the_geog, the_geom_webmercator=the_geom_webmercator ) ds = None - + dependencies = [ ('jobs', '0001_initial'), diff --git a/jobs/migrations/philippines.geojson b/jobs/migrations/philippines.geojson index cf80c528a..58ed65a77 100644 --- a/jobs/migrations/philippines.geojson +++ b/jobs/migrations/philippines.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:12:44.352123+00", "updated_at": "2015-05-26 11:12:44.352136+00", "id": 6, "uid": "a6f7fd68-455f-436e-9eee-cd2f656f97ff", "name": "Philippines", "description": "Philippines Region", "the_geom": "SRID=4326;POLYGON((111.884765609425 9.2729114962596,113.378906234214 12.1225788954104,117.070312483701 13.066101274339,117.246093733674 17.3060656607585,118.740234358471 20.1358916234278,122.255859357976 22.0219994299377,125.068359357589 22.1034540951889,126.210937482432 17.557627890048,127.177734357292 11.6925831566376,127.70507810722 7.44690085191488,127.265624982279 5.00065822233908,124.189453107706 4.65034238259043,121.289062483116 4.29985223014537,119.531249983359 4.21220398251494,119.531249983359 5.61325241315839,117.861328108588 6.74916892293122,117.421874983647 7.18537586616957,116.3671874838 7.44690085191488,112.060546859398 7.96947766659728,111.884765609425 9.2729114962596))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 111.884765609425386, 9.272911496259599 ], [ 113.378906234213886, 12.12257889541044 ], [ 117.070312483700874, 13.06610127433904 ], [ 117.246093733673874, 17.30606566075846 ], [ 118.740234358471369, 20.135891623427806 ], [ 122.255859357976377, 22.021999429937747 ], [ 125.068359357589358, 22.103454095188944 ], [ 126.210937482431859, 17.557627890047982 ], [ 127.177734357292366, 11.692583156637568 ], [ 127.705078107220359, 7.44690085191488 ], [ 127.265624982278865, 5.00065822233908 ], [ 124.18945310770637, 4.650342382590431 ], [ 121.28906248311587, 4.299852230145369 ], [ 119.531249983358862, 4.212203982514944 ], [ 119.531249983358862, 5.613252413158395 ], [ 117.861328108588367, 6.749168922931226 ], [ 117.421874983646887, 7.185375866169571 ], [ 116.367187483799853, 7.44690085191488 ], [ 112.060546859398386, 7.969477666597284 ], [ 111.884765609425386, 9.272911496259599 ] ] ] } } ] diff --git a/jobs/migrations/south_america.geojson b/jobs/migrations/south_america.geojson index 8a5377556..ec02e385e 100644 --- a/jobs/migrations/south_america.geojson +++ b/jobs/migrations/south_america.geojson @@ -1,7 +1,7 @@ { "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - + "features": [ { "type": "Feature", "properties": { "created_at": "2015-05-26 11:05:59.403726+00", "updated_at": "2015-05-26 11:05:59.403739+00", "id": 3, "uid": "1e08812c-2f60-47cd-a411-793e1f5ebf33", "name": "South and Central America", "description": "South and Central American Region", "the_geom": "SRID=4326;POLYGON((-93.1640624870399 13.7073670000679,-91.7138671747401 16.4650608116992,-88.2861328002162 16.3807560443685,-86.3964843629786 17.1801550411554,-81.2988281136887 14.9421311783146,-81.6064453011459 10.4851111721586,-77.6513671766967 10.5715221253983,-72.1582031149613 13.3228122347172,-67.8076171780665 13.536530397654,-63.8085937411232 13.1089051228971,-62.0947265538622 11.3911867654818,-60.60058592907 11.9506623519828,-59.8974609291682 11.4773329998123,-59.3920898354899 10.2014067929301,-60.073242179143 9.70634981408879,-55.4370117110398 7.85794025613796,-48.9331054619452 4.01221978102519,-42.780761712802 -0.994212798197285,-32.4096679642457 -4.855627549942,-33.9038085890378 -13.9500611844862,-40.7592773380838 -25.903703300047,-47.6147460871288 -32.1244533598151,-53.3276367113341 -38.3631951299127,-60.0952148353918 -41.7262304438208,-62.9077148350003 -45.1704199676464,-60.886230460282 -49.2857234058972,-57.3706054607707 -50.5867244010464,-54.9096679611136 -52.7130032557919,-59.7436523354404 -53.8168689011639,-69.3237304591075 -57.7657287296037,-77.3217773329942 -53.8687246030811,-77.497558582969 -48.3598990848976,-78.1127929578835 -38.2252352345461,-72.5756835836548 -30.8503634656227,-71.7846679587646 -24.2319379298285,-78.6401367078106 -19.0049966402529,-83.4741210821374 -11.3777240536106,-91.911621080962 -3.80396505389073,-94.1088867056605 -1.08208898755496,-93.142089830791 2.25710640883162,-88.5717773314282 8.72764790199416,-93.1640624870399 13.7073670000679))" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -93.164062487039871, 13.707367000067906 ], [ -91.713867174740145, 16.46506081169921 ], [ -88.286132800216237, 16.380756044368521 ], [ -86.396484362978583, 17.180155041155388 ], [ -81.2988281136887, 14.942131178314582 ], [ -81.606445301145939, 10.485111172158581 ], [ -77.651367176696752, 10.571522125398335 ], [ -72.15820311496131, 13.322812234717249 ], [ -67.807617178066565, 13.536530397654044 ], [ -63.808593741123218, 13.108905122897099 ], [ -62.094726553862174, 11.391186765481779 ], [ -60.600585929070064, 11.95066235198278 ], [ -59.897460929168169, 11.477332999812322 ], [ -59.392089835489948, 10.201406792930133 ], [ -60.073242179142973, 9.706349814088794 ], [ -55.437011711039851, 7.857940256137961 ], [ -48.93310546194526, 4.012219781025189 ], [ -42.780761712802061, -0.994212798197285 ], [ -32.409667964245671, -4.855627549942002 ], [ -33.903808589037773, -13.950061184486163 ], [ -40.759277338083763, -25.903703300047045 ], [ -47.614746087128857, -32.124453359815092 ], [ -53.327636711334151, -38.363195129912675 ], [ -60.095214835391843, -41.726230443820789 ], [ -62.907714835000348, -45.170419967646374 ], [ -60.886230460282043, -49.285723405897194 ], [ -57.37060546077074, -50.586724401046453 ], [ -54.909667961113655, -52.713003255791961 ], [ -59.743652335440444, -53.816868901163907 ], [ -69.323730459107537, -57.765728729603673 ], [ -77.321777332994216, -53.868724603081134 ], [ -77.49755858296902, -48.359899084897584 ], [ -78.112792957883514, -38.22523523454614 ], [ -72.575683583654836, -30.850363465622749 ], [ -71.784667958764629, -24.23193792982849 ], [ -78.640136707810626, -19.00499664025287 ], [ -83.47412108213743, -11.37772405361059 ], [ -91.911621080962007, -3.80396505389073 ], [ -94.108886705660495, -1.08208898755496 ], [ -93.142089830791008, 2.257106408831622 ], [ -88.571777331428208, 8.727647901994164 ], [ -93.164062487039871, 13.707367000067906 ] ] ] } } ] diff --git a/jobs/osm_presets.xml b/jobs/osm_presets.xml index 1707d69b3..97953fca9 100644 --- a/jobs/osm_presets.xml +++ b/jobs/osm_presets.xml @@ -4812,7 +4812,7 @@ - + diff --git a/jobs/tests/files/example_transform.sql b/jobs/tests/files/example_transform.sql index 357cb7733..936e81d8a 100644 --- a/jobs/tests/files/example_transform.sql +++ b/jobs/tests/files/example_transform.sql @@ -1,6 +1,6 @@ ---renommage des tables -ALTER TABLE planet_osm_point RENAME TO old_planet_osm_point; -ALTER TABLE planet_osm_line RENAME TO old_planet_osm_line; +--renommage des tables +ALTER TABLE planet_osm_point RENAME TO old_planet_osm_point; +ALTER TABLE planet_osm_line RENAME TO old_planet_osm_line; ALTER TABLE planet_osm_polygon RENAME TO old_planet_osm_polygon ; --creation des nouvelles tables avec colonnes en Francais @@ -34,13 +34,13 @@ CREATE TABLE planet_osm_point( tourisme VARCHAR (80), velo VARCHAR (80), voie VARCHAR (80) - ); + ); ---creation de la colonne spatiale dans la table point -SELECT AddGeometryColumn('planet_osm_point', 'the_geom', 3857, 'POINT', 'XY'); +--creation de la colonne spatiale dans la table point +SELECT AddGeometryColumn('planet_osm_point', 'the_geom', 3857, 'POINT', 'XY'); --copie des données de la table source renommée dans la nouvelle -INSERT INTO planet_osm_point ( +INSERT INTO planet_osm_point ( the_geom, acces, artificiel, @@ -69,9 +69,9 @@ INSERT INTO planet_osm_point ( tourisme, velo, voie - ) + ) -SELECT +SELECT Geometry, access, man_made, @@ -123,10 +123,10 @@ CREATE TABLE planet_osm_line ( velo VARCHAR (80), voie VARCHAR (80) ); - -SELECT AddGeometryColumn('planet_osm_line', 'the_geom', 3857, 'LINESTRING', 'XY'); -INSERT INTO planet_osm_line ( +SELECT AddGeometryColumn('planet_osm_line', 'the_geom', 3857, 'LINESTRING', 'XY'); + +INSERT INTO planet_osm_line ( the_geom, acces, artificiel, @@ -144,9 +144,9 @@ INSERT INTO planet_osm_line ( sensunique, tourisme, velo, - voie -) -SELECT + voie +) +SELECT Geometry, access, man_made, @@ -167,7 +167,7 @@ SELECT highway FROM old_planet_osm_line ; - + CREATE TABLE planet_osm_polygon ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, @@ -195,7 +195,7 @@ CREATE TABLE planet_osm_polygon ( tourisme VARCHAR (80), voie VARCHAR (80) ); - + SELECT AddGeometryColumn('planet_osm_polygon', 'the_geom', 3857, 'MULTIPOLYGON', 'XY'); INSERT INTO planet_osm_polygon ( @@ -223,9 +223,9 @@ INSERT INTO planet_osm_polygon ( sport, tourisme, voie - ) + ) -SELECT +SELECT Geometry, access, man_made, @@ -250,12 +250,12 @@ SELECT sport, tourism, highway - -FROM old_planet_osm_polygon ; + +FROM old_planet_osm_polygon ; -DROP TABLE old_planet_osm_point ; +DROP TABLE old_planet_osm_point ; DROP TABLE old_planet_osm_line ; DROP TABLE old_planet_osm_polygon ; ---fin \ No newline at end of file +--fin \ No newline at end of file diff --git a/jobs/tests/files/example_translate.txt b/jobs/tests/files/example_translate.txt index 1fea23a4e..3b14c4eb0 100644 --- a/jobs/tests/files/example_translate.txt +++ b/jobs/tests/files/example_translate.txt @@ -285,7 +285,7 @@ office=architext architecte office=association association office=compagnie entreprise office=educational_institution établissement d'enseignement -office=employment_agency +office=employment_agency office=estate_agent agence immobilière office=foundation fondation office=government administration gouvernementale diff --git a/jobs/tests/files/hdm_presets.xml b/jobs/tests/files/hdm_presets.xml index 6d2532f83..e6b102460 100644 --- a/jobs/tests/files/hdm_presets.xml +++ b/jobs/tests/files/hdm_presets.xml @@ -1,5 +1,5 @@ - - - @@ -247,9 +247,9 @@ - - - + @@ -652,7 +652,7 @@ + - - - - - -
diff --git a/ui/templates/osm/error.html b/ui/templates/osm/error.html index 7445936e2..a9ba6135b 100644 --- a/ui/templates/osm/error.html +++ b/ui/templates/osm/error.html @@ -8,7 +8,7 @@
{% trans "OpenStreetMap Login Error" %}

- {% trans "There was a problem logging you in to OpenStreetMap"%}
+ {% trans "There was a problem logging you in to OpenStreetMap"%}

{{ message }} diff --git a/ui/templates/osm/login.html b/ui/templates/osm/login.html index bfacd1b2b..2698e32c7 100644 --- a/ui/templates/osm/login.html +++ b/ui/templates/osm/login.html @@ -37,7 +37,7 @@

{% trans 'How to Get Started' %}

- + {% endif %} diff --git a/ui/templates/osm/logout.html b/ui/templates/osm/logout.html index 48d3d7f5b..063181e8a 100644 --- a/ui/templates/osm/logout.html +++ b/ui/templates/osm/logout.html @@ -2,7 +2,7 @@ {% load staticfiles %} {% load i18n %} {% block container %} - +
{% trans "You have successfully logged out of OpenStreetMap" %}
diff --git a/ui/templates/ui/base.html b/ui/templates/ui/base.html index 099526b0d..24e0f5018 100644 --- a/ui/templates/ui/base.html +++ b/ui/templates/ui/base.html @@ -21,7 +21,7 @@ {% endblock %} - +
- +
@@ -279,13 +279,13 @@

{% trans 'Export Options' %}

- +
- +
@@ -300,7 +300,7 @@

{% trans 'Export Options' %}

- +
@@ -87,7 +87,7 @@
- +
@@ -279,13 +279,13 @@

{% trans 'Export Options' %}

- +
- +
@@ -300,7 +300,7 @@

{% trans 'Export Options' %}

- + @@ -116,7 +116,7 @@