Solved

Writing features based on attribution


Badge +3

Hi

I have a grid index, I want to use the attribution from the index to pull various raster tiles. Currently, I have clipped the index to my area of interest. These are then feeding into my FeatureReader. I have setup the FeatureReader as seen below. Here is where I have the problem, the FeatureReader is writing out the original index and not the rasters I wanted to select (Using the SHEET_NAME from the index). What am I doing wrong? Thanks for the help. B

icon

Best answer by nielsgerrits 14 May 2018, 13:20

View original

11 replies

Userlevel 6
Badge +32

I think you have a number of features you feed into the FeatureReader? Then you need to construct the full path to the specific files and feed this to the field dataset. Now you are reading all the files in the folder multiple times.

My typical workflow for these things is:

- Creator to initiate workspace.

 

- FeatureReader (directory and filename reader)

 

- Some steps to filter down the files you want.

 

- FeatureReader (file specific reader) to read the selected files.

featurereaderdemo2017.fmw

Badge +3

I think you have a number of features you feed into the FeatureReader? Then you need to construct the full path to the specific files and feed this to the field dataset. Now you are reading all the files in the folder multiple times.

My typical workflow for these things is:

- Creator to initiate workspace.

 

- FeatureReader (directory and filename reader)

 

- Some steps to filter down the files you want.

 

- FeatureReader (file specific reader) to read the selected files.

featurereaderdemo2017.fmw

Thanks for your response. I am indeed trying to get a number of features from my vector grid index to feed into the FeatureReader, I then want the Sheet Name to be used to pull the various Tiff images. I'm sorry I'm relatively new to all this, if you could be more specific I would really appreciate it. Thanks B

 

 

 

Userlevel 6
Badge +32
Thanks for your response. I am indeed trying to get a number of features from my vector grid index to feed into the FeatureReader, I then want the Sheet Name to be used to pull the various Tiff images. I'm sorry I'm relatively new to all this, if you could be more specific I would really appreciate it. Thanks B

 

 

 

I updated my answer @bjudes - not sure if this is exactly what you are looking for but one way to do this. Give a shout if you need more.
Badge +3
I updated my answer @bjudes - not sure if this is exactly what you are looking for but one way to do this. Give a shout if you need more.
Thanks @nielsgerrits, I really appreciate your help. I think I'm making progress with your help. When I get to the tester stage I want to filter the Directories/Pathnames by the Index, this however does not appear to be doing anything (see 2596 passed when I just want the 50). I'm going wrong somewhere. :( Thanks B

Userlevel 6
Badge +32
Thanks @nielsgerrits, I really appreciate your help. I think I'm making progress with your help. When I get to the tester stage I want to filter the Directories/Pathnames by the Index, this however does not appear to be doing anything (see 2596 passed when I just want the 50). I'm going wrong somewhere. :( Thanks B

You need to join the streams first. FeatureMerger can do this for you.
Badge +3
I updated my answer @bjudes - not sure if this is exactly what you are looking for but one way to do this. Give a shout if you need more.
@nielsgerrits I'm sure this is stupid, but I can't get the Features to merge. I'm merging grid index with the path filename? Doesn't seem to make sense. Sorry. Thanks for the help :(

 

 

*edit I think my data is not as I thought it was. Thanks for the help. B

 

Userlevel 6
Badge +32
You need to join the streams first. FeatureMerger can do this for you.
@bjudes is it solved? I was disconnected for a while. The idea is to merge the 2 streams based on a corresponding field. Then only the files you need leave the merged port and can be read by the FeatureReader.

 

Badge +3
@nielsgerrits I'm sure this is stupid, but I can't get the Features to merge. I'm merging grid index with the path filename? Doesn't seem to make sense. Sorry. Thanks for the help :(

 

 

*edit I think my data is not as I thought it was. Thanks for the help. B

 

@nielsgerrits I can't seem to get the features to merge. Within the shapefile, the sheet name attribute is exactly matching the file name of the raster images. I want to now filter the raster files by the sheet name in the shapefile. I understand the concept, but I can't get them to merge for the life of me.

 

 

Is there another way to filter the raster file names? Thanks for the help. B

 

 

*@nielsgerrits I've figured it out, the .tif at the end of the filename was stopping the merge. Got there in the end. Thanks for all the help, you have great patience. B

 

Userlevel 6
Badge +32
@nielsgerrits I can't seem to get the features to merge. Within the shapefile, the sheet name attribute is exactly matching the file name of the raster images. I want to now filter the raster files by the sheet name in the shapefile. I understand the concept, but I can't get them to merge for the life of me.

 

 

Is there another way to filter the raster file names? Thanks for the help. B

 

 

*@nielsgerrits I've figured it out, the .tif at the end of the filename was stopping the merge. Got there in the end. Thanks for all the help, you have great patience. B

 

@bjudes no worries almost there. Can you upload your workspace here? I'll check.

 

Badge +3
@nielsgerrits I can't seem to get the features to merge. Within the shapefile, the sheet name attribute is exactly matching the file name of the raster images. I want to now filter the raster files by the sheet name in the shapefile. I understand the concept, but I can't get them to merge for the life of me.

 

 

Is there another way to filter the raster file names? Thanks for the help. B

 

 

*@nielsgerrits I've figured it out, the .tif at the end of the filename was stopping the merge. Got there in the end. Thanks for all the help, you have great patience. B

 

@nielsgerrits Don't know if you saw my update, but I got this working. The .tif extension was preventing the merge. Thanks so much for all the help. B

 

Userlevel 6
Badge +32
@nielsgerrits Don't know if you saw my update, but I got this working. The .tif extension was preventing the merge. Thanks so much for all the help. B

 

@bjudes happy I could help.

 

Reply