问题
strange, a question which I thought I had responded and actually no!
All my GIS datas are well load in netlogo ! The layers are well aligned but xcor and ycor of agents are false false in light of the real world coordinates (e.i. img).
During sensibility analyse I whant than agents write their coordinated in a text file because I doesn't whant to deal with hundreds of shapefiles, so need to have the true GIS xcor and ycor in my agents.
My code :
set buildings gis:load-dataset "../data_gis/bati2_wgs84.shp"
set water gis:load-dataset "../data_gis/water_wgs84.shp"
set bounds gis:load-dataset "../data_gis/bounds.shp"
set quartier-gis gis:load-dataset "../data_gis/zones.shp"
set loisir-gis gis:load-dataset "../data_gis/loisir.shp"
set guest_house gis:load-dataset "../data_gis/auberges_wgs_class.shp"
set doors gis:load-dataset "../data_gis/portes_wgs84.shp"
gis:set-world-envelope (gis:envelope-of bounds) ;; limite l'espace à l'enveloppe
;;Tracer les batiements
gis:set-drawing-color black
gis:draw buildings 1
;;Tracer l'eau
gis:set-drawing-color 129 ;violet
gis:draw quartier-gis 1
gis:apply-coverage quartier-gis "ZONE" my-quartier-p
;; pour chaque vecteur dans la base on charge les auberges
foreach gis:feature-list-of guest_house [
let location gis:location-of (first
(first (gis:vertex-lists-of ?)))
;; on créée une turtle à chaque position d’un point et on lui copie ses attributs
create-auberges 1 [
set shape "circle"
set xcor item 0 location
set ycor item 1 location
; set id gis:property-value ? "id"
set nom gis:property-value ? "nom_auberg"
set size 4
set nb_chambres nb_chambres_init
;set standing random-normal 5 3
set standing gis:property-value ? "standing"
set class-standing gis:property-value ? "class"
set color scale-color red standing 0 10
]]
So I need a hand ! thank you all
来源:https://stackoverflow.com/questions/32665692/netlogo-gis-extension-how-to-have-right-xcor-and-ycor-from-turtles