Solved

Feature writer outputs wrong geometry


Badge +1

I am using FME 2018.0. The problem is that my FeatureWriter outputs some weird geometry. The first picture is my input geometry. The inspect result is generated right before entering FeatureWriter.

Then, I created a FeatureReader connecting to the geodatabase created above and inspected following geometry.

I looked into the two geometries. They have the same amount of vertex. What could cause this problem?

Update 1. I change the output format to shapefile and it works with either arc geometry type or polyline. The latter one is what I use for geodatabase output. Hope it helps.

Update 2. A simplified worksapce and relative data is attached.

icon

Best answer by taojunabc 13 June 2018, 04:16

View original

7 replies

Userlevel 4

Some questions:

  1. What is the input and output format
  2. Does the line geometry contain arcs?
  3. Have you tried visualizing the data in something other than FME Data Inspector? For example ArcGIS or QGIS?
  4. Which FME version is this?
  5. Are there any warnings in the log?
Badge +1

Some questions:

  1. What is the input and output format
  2. Does the line geometry contain arcs?
  3. Have you tried visualizing the data in something other than FME Data Inspector? For example ArcGIS or QGIS?
  4. Which FME version is this?
  5. Are there any warnings in the log?
1. The input and output format is Esri Geodatabase as. What I did is get a geojson from http requester and replace the geometry of initial data with the geojson and output it to Esri Geodatabase.

 

2. I don't think the geojson contains any arc. Just in case I attach it here.json.txt

 

3. I tried with QGIS and got the same result.

 

4. As mentioned, I am using Desktop 2018.0

 

5. There are a couple of warnings but I don't think they are related to geometry.

 

One more update. I chang the output format to shapefile and it works with either arc geometry type or polyline. The latter one is what I use for geodatabase output. Hope it helps.

 

 

Userlevel 4

I had a look at the json and it doesn't contain any arcs, but interestingly enough it's composed of two identical geometries that have been aggregated into a single multi-part geometry.

Try inserting a Deaggregator and a Matcher and connect the writer to the SingleMatched port to see if that changes anything.

Badge +1

I had a look at the json and it doesn't contain any arcs, but interestingly enough it's composed of two identical geometries that have been aggregated into a single multi-part geometry.

Try inserting a Deaggregator and a Matcher and connect the writer to the SingleMatched port to see if that changes anything.

Tired Deaggregator and Matcher but it only output to MultiMatched port. I have attached a simplified FME workspace with data. Hope it is helpful.

 

 

Badge +6

This is because your output data does not specify a coordinate system.

If the data before importing into GDB has a coordinate system, then GDB will specify a default XY tolerance value based on the coordinate system, but if not know the coordinate system, GDB will not know the value of this value and will only give a relatively small value. In this example this value is 0.001 Unknown, but if you look at your input data, you'll find that this value is 0.000000008983153 degrees, and 0.001 Degree is a very large value, GDB will simplify the processing of the vertices smaller than this value, so it caused you to see the results. So in this example, You only need to specify the same coordinate system WGS 1984 as the input data, then you will get the result you want.

Badge +1

This is because your output data does not specify a coordinate system.

If the data before importing into GDB has a coordinate system, then GDB will specify a default XY tolerance value based on the coordinate system, but if not know the coordinate system, GDB will not know the value of this value and will only give a relatively small value. In this example this value is 0.001 Unknown, but if you look at your input data, you'll find that this value is 0.000000008983153 degrees, and 0.001 Degree is a very large value, GDB will simplify the processing of the vertices smaller than this value, so it caused you to see the results. So in this example, You only need to specify the same coordinate system WGS 1984 as the input data, then you will get the result you want.

Thank you taojunabc! You really save my week. I thought GeometryReplacer used original coordinate system if the geojson has no CS specified. One additional question: what tolerance does shpefile apply to geometries with unknown CS?

 

 

Badge +6

This is because your output data does not specify a coordinate system.

If the data before importing into GDB has a coordinate system, then GDB will specify a default XY tolerance value based on the coordinate system, but if not know the coordinate system, GDB will not know the value of this value and will only give a relatively small value. In this example this value is 0.001 Unknown, but if you look at your input data, you'll find that this value is 0.000000008983153 degrees, and 0.001 Degree is a very large value, GDB will simplify the processing of the vertices smaller than this value, so it caused you to see the results. So in this example, You only need to specify the same coordinate system WGS 1984 as the input data, then you will get the result you want.

GeometryReplacer, like its name, only restores geometry. If you lose coordinate system information in the conversion project (for example, if you use HTPCaller here), then you can use CoordinateSystemExtractor to save the coordinate system information in an attribute. Then use CoordinateSystemSetter to restore it.

 

 

For Shapefile, I'm not sure, but according to my observations, it doesn't have a mechanism like GDB, If you use ArcGIS to view Shapefile's properties, you will find that there is no XY tolerance. So I think there is no concept of XY tolerance in Shape, it just tries to faithfully record the original coordinates. This may be the reason why geometry does not change significantly when exported as Shape.

 

 

Reply