Skip to main content
Question

Shp number field's decimal place is not reading properly


brandonguo
Contributor
Forum|alt.badge.img+3

I have a shp file generated by QGIS with three decimal places. In FME, the feature reader seems to auto round the field.

QGISimageI tried to change the "Numeric attribute type handling" to "explicit width and precision", still doesn't work.

 

Is there any way to let FME read the data as same as QGIS?

 

6 replies

verdoodtdries
Supporter
Forum|alt.badge.img+18

Hi @brandonguo​ ,

As a workaround, one can convert the datatype from numeric to string in QGIS. Next step is to read the string attributes in FME. This prevents the rounding error.


rahulsharma
Safer
Forum|alt.badge.img+10

Hi @brandonguo​ 

Can you clarify the data typeset on the reader?

As per my understanding, these values should be stored as data type "number" with precision

Shape_LatLongCan you share your shapefile if possible?

 


brandonguo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • May 12, 2022
rahulsharma wrote:

Hi @brandonguo​ 

Can you clarify the data typeset on the reader?

As per my understanding, these values should be stored as data type "number" with precision

Shape_LatLongCan you share your shapefile if possible?

 

Hi @rahulsharma​ 

The data type is 32 bit real. See the screenshot below and the sample file for more details. Thank you.

 

imageimage 


brandonguo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • May 12, 2022
verdoodtdries wrote:

Hi @brandonguo​ ,

As a workaround, one can convert the datatype from numeric to string in QGIS. Next step is to read the string attributes in FME. This prevents the rounding error.

Thanks, @verdoodtdries​  The reader is a part of a validation workbench, which will receive data from various external sources. I am not sure if there is any way to auto this process within FME.


rahulsharma
Safer
Forum|alt.badge.img+10
brandonguo wrote:

Hi @rahulsharma​ 

The data type is 32 bit real. See the screenshot below and the sample file for more details. Thank you.

 

imageimage 

I have filed an internal ticket FMEENGINE-73421 to track the issue.

WORKAROUND: For now, the old ESRI SHAPE reader appears to be handling this file better.

See attached repro which is using the reader, you can essentially, change the shapefile, in the navigator window to use your own.


brandonguo
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • May 15, 2022
brandonguo wrote:

Hi @rahulsharma​ 

The data type is 32 bit real. See the screenshot below and the sample file for more details. Thank you.

 

imageimage 

Thanks @rahulsharma​ Can I use the old shape reader in a newer version FME server?

FME Server 2021.2

Build 21784 - win64


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