I have some CityGML buildings and I imported them into postgis database using 3d citydatabase. I want to generate points on buildings surfaces just like in the shown image. Building surfaces are stored as polygonz surfaces in Postgis. How can I generate points on these 3d polygon surfaces? Are there any function of postgis for this? Or are there any algorithm for this purpose ? Can I create a function in postgis for this purpose?
This is doable though probably more complicated than you described. A plan is to :
- Extract all surfaces from CityGML. I have a tool that can do this for individual buildings. On another note, FME is a really good tool to convert CityGML to triangle mesh.
- sample points from this mesh. There are many tools, you can check this tool that we have.
I have also written a blog post on similar matters here.