Replies: 2 comments 5 replies
-
but the transformation matrix is not only doing a rotation, see the matrices there: https://www.cityjson.org/dev/geom-templates/ |
Beta Was this translation helpful? Give feedback.
2 replies
-
The points are rotated about the origin (0,0,0). Try and move the origin to the center of your template geometry (at least on the xy-plane if you want to rotate around the z-axis). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm struggling with a problem while working with CityJSON. I'm using a geometry template, but I encountered a very unusual issue. I tried using the following template( the same template in here::
{
"type": "CityJSON",
"version": "1.1",
"CityObjects": {
"mybigtree": {
"type": "SolitaryVegetationObject",
"attributes": {
"size": "very big",
"shape": "kind of a box"
},
"geometry": [
{
"type": "GeometryInstance",
"template": 0,
"boundaries": [0],
"transformationMatrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
}
]
}
},
"vertices": [[174000,875000,0]],
"geometry-templates": {
"vertices-templates": [
[0,0,5],[10,0,5],[10,10,5],[0,10,5],[0,0,15],[10,0,15],[10,10,15],[0,10,15]
],
"templates": [
{
"boundaries": [[[0,3,2,1]],[[4,5,6,7]],[[0,1,5,4]],[[1,2,6,5]],[[2,3,7,6]],[[0,4,7,3]]],
"lod": "1",
"type": "MultiSurface"
}
]
},
"transform": {
"scale": [0.001,0.001,0.001],
"translate": [85000,446000,0]
},
"metadata": {
"referenceSystem": "https://www.opengis.net/def/crs/EPSG/0/7415"
}
}
However, when I change the transformationMatrix from
"transformationMatrix": [1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]
to:
"transformationMatrix": [0,1,0,0,-1,0,0,0,0,0,1,0,0,0,0,1]
the entire position of the object changes, which seems absurd because I’m only applying a rotation.
i display the cityjson in piero here
Beta Was this translation helpful? Give feedback.
All reactions