Skip to main content
Solved

Hi, I have a CAD file with 1000 polygon, 500 out 1000 are shifted 0.2m. I want to keep only 500 regardless of the shifting. please advice. thanks

  • November 12, 2023
  • 18 replies
  • 58 views

ohashkii
Contributor
Forum|alt.badge.img+8
Hi, I have a CAD file with 1000 polygon, 500 out 1000 are shifted 0.2m. I want to keep only 500 regardless of the shifting. please advice. thanks

Best answer by takashi

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

I think Matcher is still helpful.

Set an appropriate value (e.g. 0.5 or so) to the Vector Tolerance parameter, and take a look at output features from the SingleMatched port.

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.

18 replies

takashi
Celebrity
  • November 12, 2023

Hi @ohashki​ ,

​What is the criteria to determine if a polygon is shifted?


ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • November 13, 2023

Something like this:

imageconvert the polygons to points, so you can compare them with a point on point overlayer to find those which are offset from each other. Then, pick one from each set of overlaps, and return it back to a polygon.


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 13, 2023

Hi @ohashki​ ,

​What is the criteria to determine if a polygon is shifted?

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 


takashi
Celebrity
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

ChangeDetector might help you to compare polygons read from the two differenct sources.


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

This case is an existing file. two sources are already merged into one file.


takashi
Celebrity
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

OK, have a look at Matcher too.


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 13, 2023

Something like this:

imageconvert the polygons to points, so you can compare them with a point on point overlayer to find those which are offset from each other. Then, pick one from each set of overlaps, and return it back to a polygon.

Thanks... the logic looks fine. But I cant find the value of for the right value of the tester (@value(_min_count)) .

 

 


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Sir,

it seem that you misunderstand the problem.

Matcher gives you the identical features.


takashi
Celebrity
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Yes, that gives you identical features. The identical features are not-shifted features, aren't they?


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Please re read the question.


takashi
Celebrity
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Could you please elaborate what situation is "shifted" or not?


takashi
Celebrity
  • November 13, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

See the attached screenshot.

I thought that the left situation is "shifted" (orange polygon doesn't match blue one), the right situation is "not-shifted" (orange polygon matches blue one).

If it was correct, you can detect "not-shifted" (matched) polygons with Matcher.

If not, what situation is "shifted"?

polygons


featuremichael
Enthusiast
Forum|alt.badge.img+9

@ctredinnick​ @ohashki​ Good Morning from Austria,

 

Sorry to ask, but how can I guarantee that the lower counter ID is the correct geometry?

 

greetings Michael


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 14, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Hi,

500 polygons are mistakenly inserted twice at CAD file(duplicated) with a shift of 0.2, They became 1000. I need to remove the duplicated ones (500). is that clear Sir.


ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • November 14, 2023

@ctredinnick​ @ohashki​ Good Morning from Austria,

 

Sorry to ask, but how can I guarantee that the lower counter ID is the correct geometry?

 

greetings Michael

I don't think it mattered which one was 'correct', just that only one was picked.

An even simpler setup is just to use a Matcher, checking geometry, with a 0.5 tolerance. If there is some criteria for picking which one of the duplicates to keep, then you can apply that on the features which come out as Matched. Else just keep the Single Matched and Not Matched features.


takashi
Celebrity
  • Best Answer
  • November 14, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

I think Matcher is still helpful.

Set an appropriate value (e.g. 0.5 or so) to the Vector Tolerance parameter, and take a look at output features from the SingleMatched port.


featuremichael
Enthusiast
Forum|alt.badge.img+9

I don't think it mattered which one was 'correct', just that only one was picked.

An even simpler setup is just to use a Matcher, checking geometry, with a 0.5 tolerance. If there is some criteria for picking which one of the duplicates to keep, then you can apply that on the features which come out as Matched. Else just keep the Single Matched and Not Matched features.

My Bad, i didn't saw the answer in the question -.-'


ohashkii
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • November 15, 2023

Thank Takashi,

No specific criteria. Only the user inserts two polygon cad layers from different sources on the same CAD layer with an error varies from 0.0 to 0.3 cm.

 

Thanks....

Now...You get it right.🙂