Skip to main content
Question

Specifying Features to Read


cwarren
Forum|alt.badge.img

I am needing to read a DWG and read only the features that meet a regular expression, and wasn't sure if that would be possible. The features have a dynamic suffix to them, but I need to match only part of the name, then read those specific features into the workspace.

Example:

Read only the features that contain "BOUNDARY".

DWG features: BOUNDARY 321, BOUNDARY 123

Thanks for any help.

7 replies

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 18, 2017

Hi @madwarren,

When you put the Reader DWG file its possible to make this :

In Feature Type Reader select then Merge Feature Type and write your Boundary with symbol *:

Thanks,

Danilo


cwarren
Forum|alt.badge.img
  • Author
  • July 18, 2017
danilo_fme wrote:

Hi @madwarren,

When you put the Reader DWG file its possible to make this :

In Feature Type Reader select then Merge Feature Type and write your Boundary with symbol *:

Thanks,

Danilo

Thanks @danilo_inovacao. I forgot to mention that I'm using a feature reader and I don't see the option to merge with a wildcard. (RealDWG) Any idea of how to get around that?


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 18, 2017
cwarren wrote:

Thanks @danilo_inovacao. I forgot to mention that I'm using a feature reader and I don't see the option to merge with a wildcard. (RealDWG) Any idea of how to get around that?

So, do you have any attribute name from you feature reader and you would like to extract all lines ( por example ) that the prefix Boundary. Yes?

 

 


danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 18, 2017
cwarren wrote:

Thanks @danilo_inovacao. I forgot to mention that I'm using a feature reader and I don't see the option to merge with a wildcard. (RealDWG) Any idea of how to get around that?

Hi @madwarren, another option is use the transformer Tester after the Reader and configure the option Operator : Begin With = BOUNDARY

 


cwarren
Forum|alt.badge.img
  • Author
  • July 18, 2017
danilo_fme wrote:
Hi @madwarren, another option is use the transformer Tester after the Reader and configure the option Operator : Begin With = BOUNDARY

 

I was trying to limit the features that would be read into the workspace, instead of reading all features and then filtering them. Similar to a sql where clause for a database. I just wasn't sure if that would be possible to set it up to find a match (like regex), then read those specific matched features.

danilo_fme
Evangelist
Forum|alt.badge.img+45
  • Evangelist
  • July 18, 2017
cwarren wrote:
I was trying to limit the features that would be read into the workspace, instead of reading all features and then filtering them. Similar to a sql where clause for a database. I just wasn't sure if that would be possible to set it up to find a match (like regex), then read those specific matched features.
Perfect. Yes, i believe is not enable this option for DWG file.

 

 


lars_de_vries
Forum|alt.badge.img+10

Hi @madwarren,

Although it is a small extra step, you could you the function 'Feature Types To Read' within the FeatureReader transformer. At the bottom the box has a Filter function which makes it easier to filter all the objects the start with BOUNDARY.

If all the AutoCAD drawings have the same BOUNDARY layers you will only need to set it once.

At the bottom of the FeatureReader you can set the output ports you want, just a single port (like the way you wanted to setup your Merged Feature Type) or One Per Feature Type.

It might not be the ideal situation, but it helps and gives you the opportunity to only read the subset of data you are interested in.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings