Skip to main content
Question

dynamically read raster only in given extent

  • May 27, 2014
  • 9 replies
  • 140 views

Forum|alt.badge.img
I would like to dynamically read a raster using FeatureReader or RasterReader (or anything else?) transformer. This works fine but I don't want to fully load the whole raster and I have not found an option how to tell these transformers only to read the raster in a given extent, as it is possible with the "normal" ArcSDE Raster Reader.

 

 

So I want to create following Worksspace:

 

processing --> feature (perimeter) -> RasterReader (clipped to perimeter) -> further processing
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.

9 replies

david_r
Celebrity
  • May 27, 2014
Hi,

 

 

did you try the FeatureReader with the extent bounding box as the Initiator feature? Set "Spatial interaction" to INTERSECTS.

 

 

David

Forum|alt.badge.img
  • Author
  • May 27, 2014
Hi David,

 

Thank you for your answer. I have tried it and since the box and the raster intersect (so the condition is true I guess) the whole raster is loaded and not only the intersecting part...

david_r
Celebrity
  • May 27, 2014
Hi,

 

 

I believe the FeatureReader will read any (complete) feature that intersects with your Initiator. That means that if the Initiator intersects a tiny part of one big raster, that whole raster will probably be read. I do not think there is any clipping going on.

 

 

Could that be the case here?

 

 

David

Forum|alt.badge.img
  • Author
  • May 27, 2014
Yes this is the case: I have one huge raster in an ArcSDE database and want to load only a small part of it for further processing. Since it is "one" raster, all of it is loaded.

david_r
Celebrity
  • May 27, 2014
In that case you could consider having a separate workspace to read the raster using the regular SDE Raster reader, with the extent parameters as published parameters. You can then call it from your current workspace using a WorkspaceRunner.

 

 

David

Forum|alt.badge.img
  • Author
  • May 27, 2014
I wanted to avoid it since I already have a bunch of secod level workspaces and do not really wand to go into a third hierarchy. But if this is the only solution I guess I will do it. I thought since the normal reader provides the option to clip to a certain search envelope the reader-transformer can do it as well. Thanks for your help anyway!

 

Simon

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • May 27, 2014
Hi,

 

 

You can adapt the FeatureReader where clause to provide you with the area of interest, have a look at the SQL generated by the reader (set up with the clip)and emulate the where part in the FeatureReader.

Forum|alt.badge.img
  • Author
  • May 28, 2014
Hi Itay, thank you for your input. Unfortunately I am not able to find the SQL statement generated by the SDE Reader when reading the raster the "normal" way using a search envelope. I could not find anything in the window-log nor in the logfile provided by my workbench. Can you give me a hint where to search?

 

Thank you

 

Simon

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • May 28, 2014
Hi Simon,

 

Normally this will appear in the logfile, however I am not 100% sure that this will be the case when reading a raster (works just fine for vectors), so by your answer I guess that is not the case. I would go with David's suggestion or clip the raster beforehand and read it with the RasterReader.