Skip to main content
Question

best way to extract raster from geometry

  • June 10, 2020
  • 2 replies
  • 29 views

kidega
Contributor
Forum|alt.badge.img+8

Hi,

I wounder what the best way could be to extract raster from geometry? In this case, extract an ortophoto from a terrain mesh. I have tried the AppearanceExtractor which works fine. The aim is to extract the ortophoto and write it as a jpeg, then read it in the workflow and replace it on the terrain via AppearanceSetter. Works fine, but I only need one feature (face) which contains the ortophoto to write to jpeg. In one test the terrain contains 62 faces, so I use the sampler to sample First N Features to get the first face and ortophoto. The problem I find is that all other 61 faces need to be processed to output "NotSampled". So depending on the terrain mesh and no. of faces this could take quite some time. I wounder if First N Feature is found, then stop processing rest of features?

Hope it makes sense. Thanks!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

  • 6 replies
  • October 21, 2020

Hi, the sampler performance won't really change between 1 or 62 raster features. What will take away performance is actually reading 62 rasters instead of only 1. Maybe you could use the "Max Features to Read" parameter in your reader ? That would let you read only 1 feature instead of processing them all. Hope this help.


kidega
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 40 replies
  • November 1, 2020

Hi, the sampler performance won't really change between 1 or 62 raster features. What will take away performance is actually reading 62 rasters instead of only 1. Maybe you could use the "Max Features to Read" parameter in your reader ? That would let you read only 1 feature instead of processing them all. Hope this help.

Hi @alexist​ 

Thanks for this reccomendation. It helped alot!