Skip to content

Commit

Permalink
Bug with hash computation when importing shapefile - release 0.6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mz committed Dec 12, 2017
1 parent 82f395e commit d7a874f
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changes
=======

0.6.2 (2017-12-12)
------------------

- Fix bug when importing shapefiles (due to wrong hash computation).


0.6.1 (2017-12-11)
------------------

Expand Down
2 changes: 1 addition & 1 deletion magrit_app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-

__version__ = '0.6.1'
__version__ = '0.6.2'
5 changes: 3 additions & 2 deletions magrit_app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ async def convert(request):
name, ext = field[1].rsplit('.', 1)
file_name = ''.join(['/tmp/', user_id, '_', '.'.join([name, ext.lower()])])
list_files.append(file_name)
savefile(file_name, field[2].read())
content = field[2].read()
savefile(file_name, content)
if '.shp' in file_name or '.dbf' in file_name:
tmp_buf.append(field[2].read())
tmp_buf.append(content)
shp_path = [i for i in list_files if 'shp' in i][0]
layer_name = shp_path.replace(
''.join(['/tmp/', user_id, '_']), '').replace('.shp', '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ function parseQuery(search) {
lng: lang,
fallbackLng: _app.existing_lang[0],
backend: {
loadPath: 'static/locales/{{lng}}/translation.d44203aefa2c.json'
loadPath: 'static/locales/{{lng}}/translation.ab4f1ba6ef34.json'
}
}, function (err, tr) {
if (err) {
Expand Down Expand Up @@ -14477,7 +14477,6 @@ var UserArrow = function () {
y1: t.attr('y1'),
y2: t.attr('y2'),
map_locked: !!map_div.select('#hand_button').classed('locked')
// , snap_lines: snap_lines
};
}).on('start', function () {
d3.event.sourceEvent.stopPropagation();
Expand Down Expand Up @@ -15663,7 +15662,6 @@ var UserRectangle = function () {
x: +t.attr('x'),
y: +t.attr('y'),
map_locked: !!map_div.select('#hand_button').classed('locked')
// , snap_lines: get_coords_snap_lines(this.id)
};
}).on('start', function () {
d3.event.sourceEvent.stopPropagation();
Expand Down Expand Up @@ -19202,8 +19200,7 @@ function box_choice_symbol(sample_symbols, parent_css_selector) {
margin: 'auto',
display: 'inline-block',
'background-size': '32px 32px',
'background-image': 'url("' + d[1] + '")' // ['url("', d[1], '")'].join('')
};
'background-image': 'url("' + d[1] + '")' };
}).on('click', function () {
box_select.selectAll('p').each(function () {
this.style.border = '';
Expand Down Expand Up @@ -19369,7 +19366,6 @@ var createBoxProj4 = function createBoxProj4() {
input_section.append('input').styles({ width: '90%' }).attrs({
id: 'input_proj_string',
placeholder: 'EPSG:3035'
// placeholder: '+proj=laea +lat_0=52 +lon_0=10 +x_0=4321000 +y_0=3210000 +ellps=GRS80 +units=m +no_defs',
});

var fn_cb = function fn_cb(evt) {
Expand Down Expand Up @@ -20334,8 +20330,7 @@ var boxExplore2 = {
placeholder: i18next.t('app_page.table.search'), // The search input placeholder
perPage: i18next.t('app_page.table.entries_page'), // per-page dropdown label
noRows: i18next.t('app_page.table.no_rows'), // Message shown when there are no search results
info: i18next.t('app_page.table.info') // "Showing {start} to {end} of {rows} entries"
}
info: i18next.t('app_page.table.info') }
});
// Adjust the size of the box (on opening and after adding a new field)
// and/or display scrollbar if its overflowing the size of the window minus a little margin :
Expand Down
2 changes: 1 addition & 1 deletion magrit_app/static/json/list_symbols.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["plane.png","tourist_beach.png","boat.png","education_university.png","question.png","fish.png","flag.png","poi_embassy2.png","poi_tower_communications.png","poi_place_town.png","amenity=bar.png","poi_military_bunker.png","city_building.png","parking.png","landuse_grass.png","disability_lowvision.png","walker.png","teepee.png","amenity=hospital.png","skull.png","deer.png","poi_peak.png","tourist_view_point.png","tourisum_fountain.png","anchor.png","house.png","tourist_wreck.png","phone.png","camera.png","amenity=theatre.png","tourist_cinema.png","amenity=fire_station.png","landuse_deciduous.png","gas.png","h.png","couple.png","amenity=pub.png","education_school.png","tourist_monument.png","tourist_theatre.png","poi_cave.png","fountain.png","poi_tower_water.png","city_large.png","city_medium.png","tourist_art_gallery2.png","landuse_coniferous.png","poi_embassy.png","food_pub.png","car.png","amenity=restaurant.png","poi_place_city.png","tourist_casino.png","tourist_zoo.png","landuse_coniferous_and_deciduous.png","tourist_memorial.png","landuse_swamp.png","tourist_picnic.png","tourist_steam_train.png","food_fastfood.png","food_drinkingtap.png","tourist_windmill.png","tourist_waterwheel.png","poi_mine.png","shipwreck.png","tourist_museum.png","disability_accessibility.png","parachute.png","skier.png","landuse_scrub.png","amenity=fast_food.png","poi_boundary_administrative.png","tourist_ruin.png","poi_point_of_interest.png","tourist_battlefield.png","tourist_castle.png","food_cafe.png","cross.png","landuse_hills.png","education_nursery.png","food_bar.png","swimmer.png","landuse_quary.png","tourist_archaeological.png","waypoint.png","amenity=police.png","city_small.png","golf.png","tourist_fountain.png","bank.png","poi_tower_power.png","poi_place_village.png"]
["amenity=pub.png","anchor.png","phone.png","tourist_picnic.png","education_nursery.png","tourist_cinema.png","fountain.png","tourist_archaeological.png","disability_accessibility.png","golf.png","gas.png","tourisum_fountain.png","landuse_swamp.png","amenity=hospital.png","food_cafe.png","car.png","landuse_grass.png","poi_place_town.png","fish.png","tourist_memorial.png","landuse_scrub.png","tourist_art_gallery2.png","house.png","poi_military_bunker.png","amenity=police.png","amenity=restaurant.png","tourist_zoo.png","skull.png","poi_tower_water.png","poi_cave.png","amenity=fire_station.png","tourist_windmill.png","tourist_museum.png","poi_boundary_administrative.png","landuse_coniferous.png","education_university.png","tourist_wreck.png","poi_embassy.png","plane.png","food_bar.png","h.png","swimmer.png","poi_mine.png","tourist_monument.png","poi_place_city.png","tourist_view_point.png","poi_place_village.png","city_small.png","city_building.png","flag.png","tourist_casino.png","education_school.png","tourist_theatre.png","poi_embassy2.png","tourist_castle.png","skier.png","landuse_hills.png","tourist_ruin.png","city_large.png","amenity=bar.png","poi_tower_communications.png","tourist_fountain.png","teepee.png","waypoint.png","parachute.png","couple.png","poi_tower_power.png","food_drinkingtap.png","camera.png","city_medium.png","question.png","landuse_deciduous.png","tourist_beach.png","amenity=theatre.png","food_pub.png","tourist_battlefield.png","shipwreck.png","disability_lowvision.png","walker.png","boat.png","poi_point_of_interest.png","amenity=fast_food.png","poi_peak.png","cross.png","landuse_coniferous_and_deciduous.png","tourist_waterwheel.png","landuse_quary.png","parking.png","tourist_steam_train.png","bank.png","deer.png","food_fastfood.png"]
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"alert_upload_shp": "L'ensemble des fichier requis (.shp, .dbf, .shx, .prj) pour lire un shapefile doit être fournis.",
"alert_upload_invalid": "Source de données invalide (pas de GeoJSON/TopoJSON/zip/Shapefile/KML/GML détecté).",
"layer_success": "Résultat ajouté à la carte!",
"layer_success_and_proj": "Résultat ajouté à la carte! Souhaitez-vous utiliser les informations de projections contenues dans le fichier ?",
"layer_success_and_proj": "Résultat ajouté à la carte! Souhaitez-vous utiliser les informations de projection contenues dans le fichier ?",
"ask_replace_dataset": "Un jeu de données a déjà été fourni. Remplacer par ces nouvelles données ?",
"error_message": "Une erreur s'est produite - L'opération en cours a été stoppée.",
"error_discretization": "Une erreur s'est produite lors de la discrétisation (essayez avec un {{arg}} nombre de classes ou une autre méthode)",
Expand Down
2 changes: 1 addition & 1 deletion magrit_app/static/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"alert_upload_shp": "L'ensemble des fichier requis (.shp, .dbf, .shx, .prj) pour lire un shapefile doit être fournis.",
"alert_upload_invalid": "Source de données invalide (pas de GeoJSON/TopoJSON/zip/Shapefile/KML/GML détecté).",
"layer_success": "Résultat ajouté à la carte!",
"layer_success_and_proj": "Résultat ajouté à la carte! Souhaitez-vous utiliser les informations de projections contenues dans le fichier ?",
"layer_success_and_proj": "Résultat ajouté à la carte! Souhaitez-vous utiliser les informations de projection contenues dans le fichier ?",
"ask_replace_dataset": "Un jeu de données a déjà été fourni. Remplacer par ces nouvelles données ?",
"error_message": "Une erreur s'est produite - L'opération en cours a été stoppée.",
"error_discretization": "Une erreur s'est produite lors de la discrétisation (essayez avec un {{arg}} nombre de classes ou une autre méthode)",
Expand Down
4 changes: 2 additions & 2 deletions magrit_app/templates/modules.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title> {{ app_name }} </title>
<link rel="icon" type="image/png" href="static/img/favicon.png" />
<link href="static/css/scoped-bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="static/css/style.d44203aefa2c.min.css" rel="stylesheet" type="text/css">
<link href="static/css/style.ab4f1ba6ef34.min.css" rel="stylesheet" type="text/css">
<link href="static/css/_vanilla-dataTables.min.css" rel="stylesheet" type="text/css">
<link href="static/css/alertify.min.css" rel="stylesheet" type="text/css">
<link href="static/css/semantic.min.css" rel="stylesheet" type="text/css">
Expand Down Expand Up @@ -51,6 +51,6 @@
</div>
</noscript>
<script src="static/js/lib/bootstrap-native3.mod.min.js"></script>
<script src="static/js/app.d44203aefa2c.js"></script>
<script src="static/js/app.ab4f1ba6ef34.js"></script>
</body>
</html>

0 comments on commit d7a874f

Please sign in to comment.