Skip to main content
Solved

The conversion from CSV to fileGDB file failed to properly project the data- any idea why?


smfks911

Hi all, I am trying to convert a CSV file generated from IoT censors to file GDB. The table got a geolocation field in which X and Y values were separated by comma. I wanted to get the data on LL-GDA94 projection. Although I was able to create a feature but it was not projected properly and appeared out of map extent in ArcGIS. Can anyone help me with the script that I have added here? I am attaching the CSV also. Thanks in advance.

Best answer by markatsafe

@smfks911​ Just replace your Reprojector with a CoordinateSystemSetter as suggested by @tomfriedl​ or simply set the CSV reader coordinate system to be LL-GDA94. Even though there is no geometry when the CSV is read, FME will honour that when you create the geometry.

I think you might be able to simplify your workspace by using an AttributeCreator to set the X/Y values from your AttirbuteSplitter list, see attached (FME 2021.2)

View original
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

tomfriedl
Supporter
Forum|alt.badge.img+14

You transform coordinates from <Read from feature> to LL-GDA94. But CSV-Files have no coordinatesystem. You must set it with the CoordinateSystemSetter.


Forum|alt.badge.img+2

@smfks911​ Just replace your Reprojector with a CoordinateSystemSetter as suggested by @tomfriedl​ or simply set the CSV reader coordinate system to be LL-GDA94. Even though there is no geometry when the CSV is read, FME will honour that when you create the geometry.

I think you might be able to simplify your workspace by using an AttributeCreator to set the X/Y values from your AttirbuteSplitter list, see attached (FME 2021.2)


smfks911

You transform coordinates from <Read from feature> to LL-GDA94. But CSV-Files have no coordinatesystem. You must set it with the CoordinateSystemSetter.

Thanks so much Tom 🙏


smfks911

@smfks911​ Just replace your Reprojector with a CoordinateSystemSetter as suggested by @tomfriedl​ or simply set the CSV reader coordinate system to be LL-GDA94. Even though there is no geometry when the CSV is read, FME will honour that when you create the geometry.

I think you might be able to simplify your workspace by using an AttributeCreator to set the X/Y values from your AttirbuteSplitter list, see attached (FME 2021.2)

Thank you so much Mark for working on the script. Really helpful! 👍


smfks911

@smfks911​ Just replace your Reprojector with a CoordinateSystemSetter as suggested by @tomfriedl​ or simply set the CSV reader coordinate system to be LL-GDA94. Even though there is no geometry when the CSV is read, FME will honour that when you create the geometry.

I think you might be able to simplify your workspace by using an AttributeCreator to set the X/Y values from your AttirbuteSplitter list, see attached (FME 2021.2)

Hi @Mark Stoakes​ unfortunately, the code is still returning points with wrong placements of the points. The points should be ideally like this. This is same data but I converted to shapefile from GeoJSON. The coordinate system is automatically set to WGS94.

 

point_projection_pro 

But when I set the coordinate system with CSV to LL-GDA94 in the FME script, the points spread across whole earth (following image). I then tried feature to read from LL-WGS94 but then again those move to other areas. Not sure why happening like this.

 

point_projection


Forum|alt.badge.img+2

@smfks911​ I don't see that, but the XY are reversed in your data (Easting/Northing) so in the AttributeCreator you need to set Y = _listComma{0} & X = _listComma{1}


smfks911

@smfks911​ I don't see that, but the XY are reversed in your data (Easting/Northing) so in the AttributeCreator you need to set Y = _listComma{0} & X = _listComma{1}

@Mark Stoakes​ Thanks mate. Its weird that solution you have suggested is not working for me.