Skip to main content
Question

verify shape and dwg match


Forum|alt.badge.img

I have put together a FME 2014 server workbench (as attached) that allows the user to select an input shape file and output a series of shape and dwg files that contain data from an SDE database that intersect the input shape area. The process to produce shape files has been in place for some time but I’m now being asked to output the same data in dwg format. I’ve been told by others that the dwg writer will not always create the data properly (at times outputting data from one attribute into another, or dropping attributes, or adding others erroneously). I’ve not seen this myself but I need to prove that the data from the output shapes match that in the single final dwg. In my case the output file is defined by a schema mapper which renames the shape files and places them in a selected folder so it’s not as simple as checking a simple list of attributes. The output for any given shape file output will be placed on a corresponding layer in the dwg. Can you prescribe a method by which I could verify that the shape file data matches the dwg data?

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

It looks like you forgot to add the attachment, I think it would be very useful to see your workspace and also have some data where the shape and dwg don't match.


david_r
Evangelist
  • February 25, 2016

You can verify two datasets using a Matcher transformer.

If you detect anything weird going on with your dwg files, please report it to Safe so they can have a look at it, I'm pretty sure it shouldn't be like that.


Forum|alt.badge.img
  • Author
  • February 25, 2016

I've tried using the matcher testing with just a single dataset (shp and dwg format as inputs) with a selected list of attributes but it doesn't flag any as being matched even though I can see that they are matched (shp to dwg). I'm not sure why it doesn't see them as matched? In the matcher I have chosen only to match on the selected attributes. I had thought it may be due to the differing formats but it should not consider those format based attributes in the test scenario. Still not sure how I could implement this in a dynamic writing mode though?

I haven't seen an error in the dwg writer but I'm being asked to verify that the outputs do match. Be nice if I had an example that I could point to. Thx!


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • February 25, 2016
wallace wrote:

I've tried using the matcher testing with just a single dataset (shp and dwg format as inputs) with a selected list of attributes but it doesn't flag any as being matched even though I can see that they are matched (shp to dwg). I'm not sure why it doesn't see them as matched? In the matcher I have chosen only to match on the selected attributes. I had thought it may be due to the differing formats but it should not consider those format based attributes in the test scenario. Still not sure how I could implement this in a dynamic writing mode though?

I haven't seen an error in the dwg writer but I'm being asked to verify that the outputs do match. Be nice if I had an example that I could point to. Thx!

Are you testing for a geometry match too? I suspect that Shape geometry is held as integer values and DWG as floating point, so the likelihood of their geometry being an exact match is slim (it's a maths thing). Add a CoordinateRounder before the Matcher to round them off to the same number of decimal places (say 3 or 4). That might not be the issue, and I'm not sure the Matcher is the best solution anyway, but I thought I'd mention it.


mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • February 25, 2016

I've never seen the DWG writer copy attributes about like that. What I can say is that it won't write attributes that it doesn't receive. So if you have attributes A,B,C defined, and the data doesn't include B, the output has only attributes A and C. Some people expect the DWG schema to have B as well, even if it's empty. I tested that and it won't. Maybe this is what the issue is about.

If you want to confirm whether two datasets have the same schema, I would create a workspace using the Schema Reader format. However... I just tried that and it fails to work on AutoCAD data. So. Back to the drawing board. I'll have a think and let you know if I can find another solution.


Forum|alt.badge.img
  • Author
  • February 25, 2016
mark2atsafe wrote:

I've never seen the DWG writer copy attributes about like that. What I can say is that it won't write attributes that it doesn't receive. So if you have attributes A,B,C defined, and the data doesn't include B, the output has only attributes A and C. Some people expect the DWG schema to have B as well, even if it's empty. I tested that and it won't. Maybe this is what the issue is about.

If you want to confirm whether two datasets have the same schema, I would create a workspace using the Schema Reader format. However... I just tried that and it fails to work on AutoCAD data. So. Back to the drawing board. I'll have a think and let you know if I can find another solution.

Yeah I have not seen the example of the dwg writer error I was told about which occurred some time ago so I'm left trying to disprove something I know nothing about! I turned off the option to include geometry matching so that wasn't the problem. Thanks for any help you may be able to provide!


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