Solved

FME areabuilder writing polygons to gdb problem

  • 5 January 2018
  • 7 replies
  • 9 views

Badge

icon

Best answer by takashi 6 January 2018, 01:40

View original

7 replies

Userlevel 4
Badge +13

Hi @jagteshwarshan. Sharing a few more details will help the FME community help you. Please reply to this thread and provide additional details including:

  • A clear statement of the problem you are trying to resolve
  • The version of FME you are using, including build number and edition
  • A description of your expected output, with screenshots if possible
  • Your FME translation log file
  • Any other information that may be useful to share

Badge

So I want to input some lines, form polygons from them and write it to a geodatabase as a Feature Class- using the areabuilder tool of FME.

Something like this as the input converted to polygon:

1.png

I have the following FME workspace (quite straightforward):

2.png

The geodatabase writer only writes the polygon with a donut. It doesnt write the others (simple polygons without holes)

Resulting Feature Class:

3.png

Whereas the FME data inspector port shows all the polygons fine:

4.png

Why don’t the simple polygons without holes get written.

The log file states that failed to write the geometry to feature class with geometry type 'esriGeometryPolygon':

5.png

The geometry in log shows as IFME line (for the regular polygons)

Using a Geometry Filter, it shows all the 4 entities to be polygons, yet the log states otherwise.

The data inspector shows all polygons yet on gdb, only the donut polygon is written.

What is the problem here, can anybody suggest a solution to this

Badge

hi

@NatalieAtSafe

Let me know if the question is clear now. In the attachment, I have included the shapefile lines and FME workspace operating.

Also if it would help to restate the question, I can post it again?

Badge

test-copy-1gdb.zip

The Gdb on which I am working is attached (contains only one feature class on which FME workbench operates)

Your help will be greatly appreciated.

Userlevel 2
Badge +17

Hi @jagteshwarshan, I can see "filegdb_type" attribute storing "geodb_polyline" in the log messages you have posted. This indicates that format of the source dataset is File Geodatabase and the source feature class contains "polyline" features. See also this page to learn more about "filegdb_type".

Esri Geodatabase (File Geodatabase API) Feature Representation

Also, it tells the Esri Geodatabase (File Geodb Open API) writer that the geometry should be treated as a polyline as much as possible. I therefore think that the writer considered the boundary of non-donut polygon as a line.

The problem could be resolved if you exposed the attribute "filegdb_type" and remove it before writing.

Badge

Hi @jagteshwarshan, I can see "filegdb_type" attribute storing "geodb_polyline" in the log messages you have posted. This indicates that format of the source dataset is File Geodatabase and the source feature class contains "polyline" features. See also this page to learn more about "filegdb_type".

Esri Geodatabase (File Geodatabase API) Feature Representation

Also, it tells the Esri Geodatabase (File Geodb Open API) writer that the geometry should be treated as a polyline as much as possible. I therefore think that the writer considered the boundary of non-donut polygon as a line.

The problem could be resolved if you exposed the attribute "filegdb_type" and remove it before writing.

Hi @takashi

 

I have seen you help in many other posts and your suggestion in this post also works sound.

 

 

Another question I had:

 

Suppose I wanted to write the polygons (or anything in general) and then next read from what has been written to perform another set of FME operations.

 

Something like this:

 

i.e. do the writing (operation 1) first. Read from that (operation 2) next.

 

 

Is there any way to do that, can u suggest?

 

 

I know it is possible to order readers and writers in the navigator, but it doesnt allow the reader to be placed after a writer.

 

Is it possible to write to a feature and then read from it in the same workspace?

 

Userlevel 2
Badge +17

Hi @jagteshwarshan, I can see "filegdb_type" attribute storing "geodb_polyline" in the log messages you have posted. This indicates that format of the source dataset is File Geodatabase and the source feature class contains "polyline" features. See also this page to learn more about "filegdb_type".

Esri Geodatabase (File Geodatabase API) Feature Representation

Also, it tells the Esri Geodatabase (File Geodb Open API) writer that the geometry should be treated as a polyline as much as possible. I therefore think that the writer considered the boundary of non-donut polygon as a line.

The problem could be resolved if you exposed the attribute "filegdb_type" and remove it before writing.

Two options.

 

  • Branch the feature flow output from the first AttributeRemover into two streams, you can then connect one stream to the "lines2poly" feature type to write the features; connect another stream to the GeometryCoercer to continue the succeeding processing.
  • Alternatively, you can also use a FeatureWriter instead of the "lines2poly" feature type to write the polygons, and connect a FeatureReader to the FeatureWriter to read the resulting polygons.
I think the first method would be easier in this case.

Reply