09-07-2016 12:27 AM - edited 09-07-2016 12:31 AM
What I'm trying to achieve is to allow a user to upload a raster file for a small area and look up a corresponding vector row in a shape file and update some statistics. In order to do this I'm trying to use the Raster Information to retrieve a IMAGINE.Boundary then feed this into Filter By Geometries in order to find any geometries that touch the uploaded raster.
Unfortunately I'm unable to get this to work because I haven't been able to find a way to convert an IMAGINE.Boundary type into an IMAGINE.FeatureSubset. I note that when IMAGINE.Boundary is serialized using a Data Output operator that it includes in the JSON the polygon coordinates I want; I even tried to read that as a Text File and use RegExs to create a IMAGINE.FeatureSubset but then got stuck because AFAICT there is no way to save a Text File or deserialize via a String (Data Input only reads a file ?)
I was wondering, before I abandon this approach, if there was a way to convert from a Boundary into Features ? (I tried the obvious Convert operator but all I got was an error).
09-07-2016 01:50 AM
You can use different approach. Below is the model for creating a footprint for the real image data (excluding Background):
Then you can easily use the output feature as the input to FilterByGeometries operator.
Attaching the model as well.