Solved

Clipping 3D contour lines with multiple regions

  • 24 August 2017
  • 5 replies
  • 1 view

Badge

Hi all,

I'm pretty new to this and don't have a very good idea of what things are possible using FME. I'll try to describe what I want to do below.

I have a big dataset(.shp) containing 3D contour lines of New York City and I have another dataset containing 2d polygons representing neighborhoods in NYC.

I want to clip the contour lines within each region and save it separately to a dwg file. So the result would be multiple dwg files, each containing a 2d polygon and only contour lines withing that polygon. I tried exporting all to one dwg file but it results in a very big file that autocad cannot handle opening.

 

Any ideas?

icon

Best answer by trentatsafe 24 August 2017, 23:51

View original

5 replies

Badge +6

Hello @karimi,

 

 

In terms of the clipping, I believe you could just use the clipper with the lines as the clipee, and the polygons as the clipper.

 

 

If each polygon has an 'ID' or some type of attribute that is unique to each polygon, you could do a Dataset fan out based on that attribute(would result in a .dwg file for each polygon this way).

 

 

Here is an article to get you started with the Dataset Fanout writing feature:

 

https://knowledge.safe.com/articles/565/fanout-1.html
Badge +6
Hello @karimi,

 

 

In terms of the clipping, I believe you could just use the clipper with the lines as the clipee, and the polygons as the clipper.

 

 

If each polygon has an 'ID' or some type of attribute that is unique to each polygon, you could do a Dataset fan out based on that attribute(would result in a .dwg file for each polygon this way).

 

 

Here is an article to get you started with the Dataset Fanout writing feature:

 

https://knowledge.safe.com/articles/565/fanout-1.html

 

Badge

@trentatsafe @takashi

Thank you for your quick response,

The polygons have a unique ID and it would be great to do a fanout based on that id, but the issue I have now is that the clipper outputs (inside) only have attributes from the clippee and not from the clipper with unique polygon ID.

Also, I'm not sure if the clipping is working, I think it might be because the contour lines are 3D and neighborhood polygons are 2d.

here's a link to both of the datasets if you wanna take a look for yourself:

Contour lines:

https://data.cityofnewyork.us/City-Government/Contours/3cdm-p29e

Neighborhood polygons:

https://www1.nyc.gov/assets/planning/download/zip/data-maps/open-data/nynta_17c.zip

Thanks

Badge +6

@trentatsafe @takashi

Thank you for your quick response,

The polygons have a unique ID and it would be great to do a fanout based on that id, but the issue I have now is that the clipper outputs (inside) only have attributes from the clippee and not from the clipper with unique polygon ID.

Also, I'm not sure if the clipping is working, I think it might be because the contour lines are 3D and neighborhood polygons are 2d.

here's a link to both of the datasets if you wanna take a look for yourself:

Contour lines:

https://data.cityofnewyork.us/City-Government/Contours/3cdm-p29e

Neighborhood polygons:

https://www1.nyc.gov/assets/planning/download/zip/data-maps/open-data/nynta_17c.zip

Thanks

Hello @karimi,

 

In order to merge attributes from the clipper/clipee, you can use the merge attributes parameter located on the Clipper. The documentation can be found here and should help ensure you select the correct options:

 

http://docs.safe.com/fme/2017.1/html/FME_Desktop_Documentation/FME_Transformers/Transformers/clipper.htm

 

 

I believe the clipper is working, I tested it quickly and it seemed to be functioning correctly. I don't believe the 3d contours should cause an issue, however, you could try a 2Dforcer if you absolutely needed. I think the merge attributes will solve the issues, I did a quick test and did a data set fanout using the NTACode and I believe it seemed correct.

 

 

Badge

Thanks you @trentatsafe, it worked like a charm!

Reply