Hi,
I am new in Netlogo and I try to import a raster (elevation map) and vector line (path) to simulate inondation and movement of population into shelter.
In the first step, I loaded the raster in netlogo and parameters the grid with the nrows and ncols of the raster (in WGS84).
In the second step, I loaded the vector line (in WGS84 too) in Netlogo, but data doesn't match with the raster whereas in QGIS it is good as you can see in attachment.
What is the cause of this issue ? Problem of resize-world ? gis:envelope ?
Thank you for your help !
French student.
The code I created is that :
; * Import du MNT *
to Setup_Map
;resize-world
set LandLayer-dataset gis:load-dataset "C:/Users/peanu/Desktop/03_02_M2_GEODYN/Simulations_scenarios/Dossier_simulation_inondation/Data/LandLayer5m.asc" ;charger le fichier
gis:set-world-envelope (gis:envelope-of LandLayer-dataset) ;définir l'enveloppe de l'objet en coordonnées (emprise)
gis:apply-raster LandLayer-dataset elevation ;;définir valeur altitude sur une variable elevation
let min-elevation gis:minimum-of LandLayer-dataset ;altitude minimale
let max-elevation gis:maximum-of LandLayer-dataset ;altitude maximale
ask patches
[
ifelse (elevation > 0) ;si elevation présente, on met une échelle de couleur en fonction elevation
[ set pcolor scale-color brown elevation min-elevation max-elevation ]
[ set pcolor blue] ;sinon on met bleu -> La mer
]
end
; * Import du path shapefile *
to Setup_Path
set Path-dataset gis:load-dataset "C:/Users/peanu/Desktop/03_02_M2_GEODYN/Simulations_scenarios/Dossier_simulation_inondation/Data/path.shp" ; chargement chemins vectoriels
gis:set-world-envelope (gis:envelope-of Path-dataset)
;ask patches [set pcolor white]
gis:set-drawing-color yellow
gis:draw Path-dataset 0.5
end
; * Import du graphe *
; * Initialisation de la simulation *
to Init
ca
Setup_Map ;initialisation de la carte
Setup_Path ;initialisation des chemins
end