This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import subprocess | |
#gdalwarp -q -cutline "/media/robin/DATA/Donnees_M2/monPolygoneLAEA.shp" -crop_to_cutline -dstalpha -of GTiff "/media/robin/DATA/Donnees_M2/popu01clc00v5/popgrid.tif" "/media/robin/DATA/Donnees_M2/popu01clc00v5/popgridCut.tif" | |
# This command works | |
polyPath = "/media/robin/DATA/Donnees_M2/monPolygoneLAEA.shp" | |
rasterPath = "/media/robin/DATA/Donnees_M2/popu01clc00v5/popgrid.tif" | |
outRasterPath = "/media/robin/DATA/Donnees_M2/popu01clc00v5/popgridCut.tif" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.geocite.myprojet | |
import javafx.event.ActionEvent | |
import javafx.event.EventHandler | |
import javafx.scene.Group | |
import javafx.scene.Scene | |
import javafx.scene.control._ | |
import javafx.scene.effect.Lighting | |
import javafx.scene.paint.Color | |
import javafx.scene.text.Text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.geocite.myprojet | |
import javafx.event.ActionEvent | |
import javafx.event.EventHandler | |
import javafx.scene.{control, Group, Scene} | |
import javafx.scene.control._ | |
import javafx.scene.effect.Lighting | |
import javafx.scene.paint.Color | |
import javafx.scene.text.Text | |
import javafx.stage.Stage |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import fr.geocite.simprocess.javafx.ui.tableview.JFXTableView | |
import javafx.scene.layout._ | |
import javafx.geometry.{ Orientation, HPos, Insets } | |
import javafx.scene.control._ | |
import javafx.collections.{ ObservableList, FXCollections } | |
import fr.geocite.simprocess.javafx.ui.doubleslider.DoubleSlider | |
import fr.geocite.simprocess.javafx.ui.textfield.DoubleTextField | |
import javafx.beans.value.{ ObservableValue, ChangeListener } | |
import javafx.event.{ ActionEvent, EventHandler } | |
import javafx.scene.{ Node, Scene, input } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We create a list of columns, that will contain all the variables to be filtred. | |
val buffer = new scala.collection.mutable.ListBuffer[Array[_]] | |
buffer += valueVariableX | |
buffer += valueVariableY | |
listFiltre.foreach { v ⇒ v | |
val columnName = v.name.toString | |
val columnVariable = getVariableFromColumn(columnName) | |
val columnValue = get[Array[Double]](columnVariable) match { | |
case Some(i: Array[Double]) ⇒ i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val abc = scala.collection.mutable.ListBuffer[Double] | |
abc += 45 | |
abc += 87 | |
def f(l: List[_]) = l | |
f(abc) | |
implicit def arrayToList[T](a:scala.collection.mutable.ListBuffer[T]): List[T] = a.toList |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def createColumnNamesList(): List[String] = | |
{ | |
val columnsToAdd = new ListBuffer[String] | |
val tmpXCol = mappedVar.get("X") match { | |
case Some(x: String) ⇒ x | |
case _ ⇒ "" | |
} | |
if (tmpXCol != "") { | |
columnsToAdd += tmpXCol | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package fr.geocite.simprocess.hook.xylinecharts | |
import org.openmole.core.model.data._ | |
import fr.geocite.simprocess.javafx.ui.{ filter, IVariableData } | |
import org.openmole.misc.exception.UserBadDataError | |
import filter.FilterLine | |
import scala.collection.JavaConversions._ | |
import spray.json._ | |
import scala.Array | |
import javafx.collections.FXCollections |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from osgeo import ogr | |
roadShpPath = "D:\\DonneesM2\\UMZ_2000_Cut.shp" | |
fieldToUse = 'Type' | |
driver = ogr.GetDriverByName("ESRI Shapefile") | |
datasource = driver.Open(roadShpPath) | |
layer = datasource.GetLayer() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myFolder <- "/home/robin/imagesR" | |
test <- runif(n=10) | |
for(i in 1:10){ | |
png(filename=paste(myFolder, "/test_", i, ".png",sep=""), | |
units="in", | |
width=5, | |
height=4, | |
pointsize=12, |