Skip to main content
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
Hi,

 

 

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

 

 

David
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...
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
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.
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
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
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.
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
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.

Reply