Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revisionBoth sides next revision
project:electronomy [2013/03/22 14:55] – [Team] fabienroduitproject:electronomy [2013/03/25 11:36] alog
Line 3: Line 3:
 Ma commune peut elle vivre en autonomie électrique ? Ma commune peut elle vivre en autonomie électrique ?
 Le potentiel de production solaire photovoltaique en rapport à la consommation électrique Le potentiel de production solaire photovoltaique en rapport à la consommation électrique
 +
 +=== Méthodologies, hypothèses et sources ===
 +== A - Consommation électrique des ménages par commune ==
 +
 +La consommation de la grande industrie doit etre sortie des consommations. Dans le cadre de l'atelier, le choix a été fait de ne reporter que la consommation des ménages.
 +
 +1 - Consommation électrique totale des ménages sur l'ensemble du canton : 1 TWh --> 3'200 kWh/habitants (source : Canton du valais). La consommation réelle par commune ne peut etre obtenue qu'auprès des distributeurs, mais ces données ne sont pas ouvertes.
 +
 +2 - Nombre d'habitants par communes (source : office cantonal de la statistique https://www.vs.ch/Navig/navig.asp?MenuID=16556&Language=fr)
 +
 +3 - En multipliant (2) par (3), la consommation électrique de la commune est évaluée.
 +
 +4 (optionnel) - Le marquage de l'électricité par distribeur permet de reporter l'approvisionnement de la commune (hydro, nucléaire, importation, mixte européen, PV,...). Les distributeurs communaux et leurs marquage est disponible sous http://www.stromkennzeichnung.ch/fr/recherche/powera/search/powerc.
 +
 +== B - Productions potentielles de PV par commune ==
 +
 +1 - Listes des communes par NPA (source : http://www2.unil.ch/eatlasvs/wp/)
 +
 +2 - Nombre de batiments par commune (source : http://www2.unil.ch/eatlasvs/wp/)
 +
 +3 - Surface de toiture potentielles par batiment - Hypothèse : surface de toiture de 50m2 par batiment. Doit etre affiné en important les données réelles, par exemple depuis le RegBL
 +
 +4 - Production annuelle par m2 de panneau - Hypothèse : production anuelle de 160 kWh/m2. Doit etre affiné en important les production effectives, en tenant compte de l'ensoleilement et de la topologie du lieu, par exeple depuis PV GIS http://re.jrc.ec.europa.eu/pvgis/apps4/pvest.php#
 +
 +5 - En multipliant (2) par (3) par (4), déduction du potentiel de production communal
  
 ===== Data ===== ===== Data =====
Line 8: Line 33:
   * List and link your actual and ideal data sources.   * List and link your actual and ideal data sources.
  
 +===== Capture d'écran =====
 +
 +===== Captures =====
 +
 +{{:project:capture_d_e_cran_2013-03-22_a_17.23.03.png?200|}}
 +{{:project:map_large.png?200|}}
 +
 +
 +===== Code =====
 +
 +Index.html :
 +
 +<code html>
 +<html>
 +<script type="text/javascript">
 + var map,popup;
 +   function init() {
 +      map = new GeoAdmin.Map("mymap", {doZoomToMaxExtent: true});
 +      map.switchComplementaryLayer('ch.swisstopo.pixelkarte-farbe',{opacity: 100});
 +      // Ajout du layer pour voir les communes
 +      map.addLayerByName("ch.swisstopo.swissboundaries3d-gemeinde-flaeche.fill");
 +      // Ajout du layer pour voir les limites du canton
 +      map.addLayerByName("ch.swisstopo.swissboundaries3d-kanton-flaeche.fill");
 +      map.zoomToExtent(new OpenLayers.Bounds(543550,88800,680850,139600));
 +
 +    // Dessiner un cercle
 +    var vector = new OpenLayers.Layer.Vector("Locations", {
 +        styleMap: new OpenLayers.StyleMap({
 +            "default": new OpenLayers.Style({
 +                pointRadius: "20",
 +                fillColor: "#FF0000",
 +                fillOpacity: 0.8,
 +                strokeColor: "#FF8000",
 +                strokeOpacity: 0.8,
 +                strokeWidth: 2
 +            }),
 +            "hover": OpenLayers.Util.applyDefaults({
 +                pointRadius: "10",
 +                fillColor: 'red',
 +                fillOpacity: 1.0,
 +                strokeColor: 'black',
 +                strokeOpacity: 1.0
 +            }, OpenLayers.Feature.Vector.style.temporary)
 +        })
 +    });
 +
 +    // Dessiner un cercle sur Martigny
 +    var feature1 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(572494, 107137), {
 +        attributes: {text: 'example 1'}
 +    });
 +    // Dessiner un cercle sur Sion
 +    var feature2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(596118, 123452), {
 +        attributes: {text: 'example 2'}
 +    });
 +
 +    // Add features
 +    vector.addFeatures([feature1, feature2]);
 +
 +    map.addLayers([vector]);
 +
 +    // Attach a control on the feature to display the popup on hover
 +    var hover = new OpenLayers.Control.SelectFeature(vector, {
 +        renderIntent: 'hover',
 +        hover: true,
 +        highlightOnly: true,
 +        eventListeners: {
 +            featurehighlighted: function(data) {
 +                popup = new OpenLayers.Popup.FramedCloud("preview",
 +                    new OpenLayers.LonLat(data.feature.geometry.x, data.feature.geometry.y),
 +                    new OpenLayers.Size(40,20),
 +                    "<p>" + data.feature.attributes.attributes.text + "</p>",
 +                    null,
 +                    false
 +                    );
 +                map.addPopup(popup);
 +            },
 +            featureunhighlighted: function() {
 +                map.removePopup(popup);
 +            }
 +        }
 +    });
 +
 +    // Add the control to the map
 +    map.addControls([hover]);
 +
 +    hover.activate();
 +     }
 +</script>
 +<body onload="init();">
 +   <div id="mymap" style="width:100%;height:100%;border:1px solid grey;padding: 0 0 0 0;margin:10px !important;"></div>
 +   <script type="text/javascript" src="https://api.geo.admin.ch/loader.js?mode=light"></script>
 +</body>
 +</html>
 +</code>
 +
 +GetCentroid.html
 +
 +<code html>
 +<html>
 +<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
 +
 +<script>
 +$(document).ready(function() {
 + var url = 'http://api.geo.admin.ch/main/wsgi/swisssearch/geocoding';
 +  
 +  // A completer par le npa de toutes les communes
 +  var test = new Array();
 +  test[0] = 3960;
 +  test[1] = 1920;
 +  test[2] = 1950;
 + 
 +  for (var i=0;i<test.length;i++){
 +
 +     $.getJSON(url + '?query=' +  test[i] +'&services=postalcodes&no_geom=false', function(data) {
 +     $.each(data.results, function(key, val){
 +     var content = "NPA: " +val.nr+ "<br/>";
 +     content += "Label: " +val.label+ "<br/>";
 +     var coord = new Array();
 +     $.each(val.bbox, function(i,j){
 +     coord[i] = j;
 +     });
 +
 +     // Avoir la longitude et latitude de la commune
 +     content += coord[0]+6400+" | ";
 +     content += coord[1]+6400;
 +     content += "<br/>";
 +     $('#data').append(content);
 +     });
 +     }); 
 + }
 +});
 +</script>
 +<body>
 + <div id="data"></div>
 +</body>
 +</html>
 +</code>
 +
 +  * Problèmes à regler centroid
 +  * Manque plus que le for each sur chaque communes
 ===== Team ===== ===== Team =====
  
   * [[user:fabienroduit]]   * [[user:fabienroduit]]
   * Grégoire Largey   * Grégoire Largey
-  * +  * Anthony Bernardo 
 +  * Romain Paccolat 
 + 
 +===== Data ===== 
 + 
 +  * {{:project:electronomy.xlsx|}}
  
 ===== Links ===== ===== Links =====
Line 21: Line 191:
      
 {{tag>status:concept needs:dev needs:design needs:data needs:expert}} {{tag>status:concept needs:dev needs:design needs:data needs:expert}}
- 
  • project/electronomy.txt
  • Last modified: 2013/08/15 22:23
  • by loleg