Closed liberostelios closed 2 years ago
Hi @liberostelios,
I am developing a small project for data conversion from a collection of GIS-formats to CityJSON (not really familiar with the web-viewer side, sorry for this) and trying to view a MultiLineString from a CityJSON file in the public online viewer, but until now without success.
I produced a minimum example to see a simple Polyline:
{
"type": "CityJSON",
"version": "1.1",
"CityObjects": {
"id-01": {
"type": "+Generic",
"geometry": [
{
"type": "MultiLineString",
"lod": null,
"boundaries": [
[
0,
1,
2,
3
]
]
}
]
}
},
"vertices": [
[
0.0,
0.0,
0.0
],
[
10.0,
0.0,
0.0
],
[
10.0,
30.0,
0.0
],
[
0.0,
0.0,
40.0
]
],
"metadata": {
"geographicalExtent": [
0.0,
0.0,
0.0,
10.0,
30.0,
40.0
]
}
}
Regarding the issue, this should probably work. I'm not sure, if the file maybe not meets the requirements for the renderer?
Thanks in advance for comments!
Hi @pizzanapoli
I am sorry to see that your file doesn't work. Indeed, it seems like the current public version of ninja is not working with your file. I am not entirely sure why that is, as the latest development version seems to be working fine for now.
I'll try to push the latest version as soon as possible so that you have a version that works for your. Since this might still take a little long, I'll try to figure out what's wrong with this example and why it breaks the public version of ninja so that you can probably bypass it.
For sure, though, setting the lod
property to null
isn't ideal. Not that this is the cause of the issue, though.
Thanks for considering the issue and for the advice with the lod
. I was not aware that the commit which updates the cityjson-threejs-loader was not included in the main branch yet, sorry for that.
After building the version from the develop branch, I was getting the same error. The console output says, there is an undefined attribute c.material.uniforms.selectSurface
in the ThreeJsViewer.vue in line 308 (updateScene()
) from the submodule project cityjson-vue-components as this is not included to the line object after loading. Anyway, I'm not sure if I built everything right, just followed the instructions from the readme.
Hope that helps a little bit.
Good that you build the whole thing from develop! Sounds like your cityjson-vue-components git submodule isn't at the latest version. Have you made sure that you are at develop
in the submodule itself?
Btw, I need to apologise for the mess regarding how I handle dependencies here (like cityjson-vue-components being a submodule and cityjson-threejs-loader being an npm dependency directly linking to GitHub). It's one of the things that have to be sanitized and cleaned up before ninja 1.0! 😬
PS: Super nice that you use links and stuff for your post! 👌
That suggestion was totally correct, the submodule was not on develop
. After changing that, the line is rendered without any problems. So practically the issue could be closed again as the problem occurred only on the main
but is clearly solved in the current working state.
Sorry for not being able to contribute as developer for a lack of javascript and vue skills on my side. Thanks for your quick support and the nice work with the viewer, this helps a lot :thumbsup:!!
Just for the interest: How is the planning approximately for merging the branches to main
and be available on the public url?
Great to hear that it worked!
There is no concrete plan, time-wise, regarding the release of ninja 1.0. But the only thing missing is a slightly better interface to load textures. As I am currently focusing on my PhD thesis writing, the plan is to do it after I am done with the main draft. Probably somewhere between the end of June to end of July.
Fixed with dbdede9