Solved

Excel - Format of Attribute

  • 4 April 2019
  • 7 replies
  • 32 views

Badge +2

Can any one explain why FME have recognised the same excel attribute format as x coordinate in FME version 2018

icon

Best answer by markatsafe 4 April 2019, 17:36

View original

7 replies

Userlevel 2
Badge +19

I have no idea, but you can change the type of every field when you add the Excel Reader

Badge +2

I have no idea, but you can change the type of every field when you add the Excel Reader

Yes, I can change.

We have changed the reader and migrated but this created additional vertex in geometry which is not intended.

I want to know whether SAFE has updated xls reader to recognise as coordinates based on names or similar... i.e. Why it has selected x coordinate instead of y coordinate????

Badge +2

@pratap FME does now look for fields that might be a good candidate for creating a point geometry in both Excel and CSV readers. If it finds fields with names like Latitude/Longitude, Lat/Long, X/Y, etc., then the excel and CSV readers will create a point geometry. With each release we try and improve the algorithm that identified the potential coordinate fields.

FME does this because the occurrence of geometry columns is so common in the datasets that FME users seem to work with. It saves you adding a VertexCreator and also a CoordianteSystemSetter. For reading CSV data, this will only occur if you select reader parameters shown below.

You can switch the data type back to number if you wish - you can do that when you add the reader, under the reader parameters, or on the feature type (you have set Tools>FME Options>Workbench> Allow Reader Feature Type editing - see below)

If you don't change the data type, the the x/y_coordinate fields are carried through FME as a 'float'.

Don't forget to set a suitable coordinate system on the reader:

For more detail see the excel reader user documentation, under View the Attribute Types

Badge +2

@pratap FME does now look for fields that might be a good candidate for creating a point geometry in both Excel and CSV readers. If it finds fields with names like Latitude/Longitude, Lat/Long, X/Y, etc., then the excel and CSV readers will create a point geometry. With each release we try and improve the algorithm that identified the potential coordinate fields.

FME does this because the occurrence of geometry columns is so common in the datasets that FME users seem to work with. It saves you adding a VertexCreator and also a CoordianteSystemSetter. For reading CSV data, this will only occur if you select reader parameters shown below.

You can switch the data type back to number if you wish - you can do that when you add the reader, under the reader parameters, or on the feature type (you have set Tools>FME Options>Workbench> Allow Reader Feature Type editing - see below)

If you don't change the data type, the the x/y_coordinate fields are carried through FME as a 'float'.

Don't forget to set a suitable coordinate system on the reader:

For more detail see the excel reader user documentation, under View the Attribute Types

Thanks @markatsafe

As stated earlier I'm looking for confirmation of the same.

Userlevel 1
Badge +21

Yes, I can change.

We have changed the reader and migrated but this created additional vertex in geometry which is not intended.

I want to know whether SAFE has updated xls reader to recognise as coordinates based on names or similar... i.e. Why it has selected x coordinate instead of y coordinate????

i.e. Why it has selected x coordinate instead of y coordinate?

Selecting y coordinate for a field mentioning Longitude would be odd as it's pretty much guaranteed to be wrong (although maybe not considering how many people consider lat/lon to be x/y)
Badge +2

i.e. Why it has selected x coordinate instead of y coordinate?

Selecting y coordinate for a field mentioning Longitude would be odd as it's pretty much guaranteed to be wrong (although maybe not considering how many people consider lat/lon to be x/y)

you have to read the full sentence instead of part of it :)

Badge +2

you have to read the full sentence instead of part of it :)

@pratap Do you mean in your scenario, the Excel reader only automatically recognized From_Longitude as a coordinate, but not From_Latitude? That does sound strange.

 

Can you send in your sample data so we can try to reproduce the problem? And also tell me what version of FME are you using?

I can not see this behaviour with a simple dataset I created, in FME 2019.

Reply