Skip to main content
Best Answer

Writing features based on attribution

  • May 14, 2018
  • 11 replies
  • 31 views

bjudes
Enthusiast
Forum|alt.badge.img+10

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

Best answer by nielsgerrits

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

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.

11 replies

nielsgerrits
VIP
Forum|alt.badge.img+64
  • Best Answer
  • May 14, 2018

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


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • May 14, 2018

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

 

 

 


nielsgerrits
VIP
Forum|alt.badge.img+64
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.

bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • May 14, 2018
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


nielsgerrits
VIP
Forum|alt.badge.img+64
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.

bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • May 14, 2018
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

 


nielsgerrits
VIP
Forum|alt.badge.img+64
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.

 


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • May 15, 2018
@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

 


nielsgerrits
VIP
Forum|alt.badge.img+64
@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.

 


bjudes
Enthusiast
Forum|alt.badge.img+10
  • Author
  • Enthusiast
  • May 15, 2018
@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

 


nielsgerrits
VIP
Forum|alt.badge.img+64
@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.