Skip to main content
Solved

Excel - Format of Attribute


pratap
Contributor
Forum|alt.badge.img+11

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

Best answer by markatsafe

@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

View original
Did this help you find an answer to your question?

7 replies

oscard
Influencer
Forum|alt.badge.img+21
  • Influencer
  • April 4, 2019

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


pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • April 4, 2019
oscard wrote:

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????


Forum|alt.badge.img+2
  • Best Answer
  • April 4, 2019

@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


pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • April 5, 2019
markatsafe wrote:

@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.


ebygomm
Influencer
Forum|alt.badge.img+31
  • Influencer
  • April 5, 2019
pratap wrote:

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)

pratap
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • April 6, 2019
ebygomm wrote:

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 :)


xiaomengatsafe
Safer
Forum|alt.badge.img+3
pratap wrote:

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


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