3

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?enter image description here

2
  • 1
    Your questions are interesting, but there are too many of them -- this format encourages one clear question. Yes, you can always create a function. But, first, perhaps an example of one of you polygons. You say in the title regular points, regular how? The is a function ST_PointOnSurface which works in 3d, but your question as is stands is far too vague to know if that might help or not. – John Powell Nov 29 '16 at 16:55
  • with "regular" I mean equally spaced points. For instance, distances between every point must be 2 meters. Is it possible via ST_PointOnSurface? @JohnBarça – user51044 Nov 29 '16 at 18:00
0

This is doable though probably more complicated than you described. A plan is to :

  1. 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.
  2. 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.