Replies: 1 comment 2 replies
-
Hi,
For the first question (using "geometry shape <- envelope(rectangle(10
#miles, 5 #miles ))"), you get this result because GAMA is not able to
locate the environment in this case. In fact, "geometry shape <-
envelope(shape_file_roads_all)" not only sets the size of the world, but
also its coordinate reference system and allows to locate the environment
in the real world. If you are using shapefile, you need to use the envelope
of a geographic data file (or files) to set the shape of the world.
For question 2 about the height of the roads, I am not sure to understand.
Do you have data about the height of the different roads?
Cheers,
Patrick
Le mar. 24 sept. 2024 à 16:24, kmamor ***@***.***> a écrit :
… I am having difficulty getting my model to display 3D. I am going back to
basics and trying to get it to display in 2D. The following code works:
global {
file shape_file_buildings_comm <- shape_file('../includes/aylesbury_buildings_comm.shp');
file shape_file_buildings_res <- shape_file('../includes/aylesbury_buildings_res.shp');
file shape_file_roads_all <- shape_file('../includes/aylesbury_roads_2.shp');
geometry shape <- envelope(shape_file_roads_all);
init {
create building_res from: shape_file_buildings_res {
}
create building_comm from: shape_file_buildings_comm {
}
create road from: shape_file_roads_all;
}
}
species building_res {
rgb color <- #black;
aspect base {
draw shape color: color ;
// depth: height;
}
}
species building_comm {
rgb color <-#black;
aspect base {
draw shape color: color;
}
}
species road {
rgb color <- #yellow;
aspect base {
draw shape color: color;
}
}
experiment Tuto3D type: gui {
output {
display map {
species road aspect: base;
species building_res aspect: base;
species building_comm aspect: base;
}
}
}
This properly displays a road network and buildings. A few queries.
If I replace the geometry line with this:
geometry shape <- envelope(rectangle(10 #miles, 5 #miles ));
Then nothing displays. The dimensions reflect the dimensions of the
underling road network (as measured in OSM where the shapefiles were
created).
Second query: in the building_elevation model a file 'bounds.shp' is
included which sets the 3D environment. How would one make such a file
given a set 2D road network and a desired height?
—
Reply to this email directly, view it on GitHub
<#338>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALPWHK7CSEK7MC7CZUQ4YLZYFY3JAVCNFSM6AAAAABOYOA476VHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGIZTANRYGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am having difficulty getting my model to display 3D. I am going back to basics and trying to get it to display in 2D. The following code works:
This properly displays a road network and buildings. A few queries.
If I replace the geometry line with this:
geometry shape <- envelope(rectangle(10 #miles, 5 #miles ));
Then nothing displays. The dimensions reflect the dimensions of the underling road network (as measured in OSM where the shapefiles were created).
Second query: in the building_elevation model a file 'bounds.shp' is included which sets the 3D environment. How would one make such a file given a set 2D road network and a desired height?
Beta Was this translation helpful? Give feedback.
All reactions