Skip to main content

Hi everyone,

i try to import an Auxiliary trail created in Smallworld to FME for further intersections with different smallworld objects (using the SBS Plugin). Unfortunately it seems that FME cannot read the XML file correctly as i cant see any geometries. I used the XML (Extensible Markup Language) reader but maybe another reader might be better? or might a writer be useful to extract the geometries? 

I attached the XML file an hope that somebody has an idea what to do. 

Thank you! 

 

Hello @sreu, thanks for posting. I’m not particularly familiar with this flavour of XML, but hopefully the attached workspace will help you get started. I think we may need to manually create the geometry in the FME workspace. 

First, we would need to read the XML elements of interest, in this case, I focused on the “x” and “y” feature types that appeared to store coordinates. We can rename attributes so they are unique to each FME feature type and calculate the coordinate expression using an ExpressionEvaluator. New coordinates will be stored in x_result and y_result. Before creating the geometry we need to combine or join features so each record has an X,Y coordinate pair. 

Once the geometry is created, we need to reproject the points to be in the correct geolocation. After testing, it looks like we might need to create a custom coordinate system using the online tool: fme.ly/coordsys. Custom coordinate system files can be added here: %USER%\Documents\FME\CoordinateSystems (please see this doc for more information on Adding Custom Coordinate Systems). 

I’ve attached my attempt at the custom CRS so you can run the workspace, but I am not sure points are in the correct location, you may need to create your own (CoordSys_20240514_165218.fme). Right now, the points are showing up in Brussels area. Is this correct?  

Feel free to reach out if you get stuck somewhere or have questions. Happy to help, Kailin.

 


Hi @kailinatsafe,  
Thank you very much for your help. it works out and the coordinates are correct. I used the Line Builder and Line Closer to get the same polygon with the identic coordinates that i created in smallworld. 

Unfortunately i cannot merge the auxiliary trail with the smallworld data. when i try to import objects with the sbs Plugin i ‘loose’ the first number (5) in the y coordinate. 

For example: 
the correct coordinate in smallworld (UTM Zone 32) is: 
341512150.302_5676565688.856

after using the SBS Plugin Reader the coordinate changes to:  
341512150.302_676565688.856

I tried to set the correct coordinate system manually and but it is not working. Do you have any idea ? 
Best regards 


Hello @sreu, thanks for your response! Can you check to see if there is a coordinate system set on the data coming from the SBS Plugin? You might be able to use a CoordinateSystemExtractor or the FeatureInformation window to determine this.

If there is a coordinate system set on the data, its likely a custom CRS as its using mm units, which might potentially have different offets than the CRS in smallworld. We might need to reproject both to a common coordinate system (such as UTM84-31N) before properly comparing the two. Hope this helps, Kailin.


Reply