Skip to main content

Hi!

I am trying to convert a ESRI shapefile to a GMLwhich will be input for a calculation model that only takes GML. While building the conversion I get stuck at 2 issues.

When you open the desired result and my current result in an Inspector, you will notice some difference leading to my issues:

  1. Independent of how many records I pass from the shape to my current result, I will always have 1061 records in my current result. As this is the number of records my desired result has, I am looking for a way to remove all records (but not the column names) from my desired result and fill it with the records that come from the shape. Any idea how to do this?
  2. In my desired result I found a kind of list object I can’t really understand. It looks like a listobject without a record in a column as the value is <missing> but if you click on the record it shows you a listobject. Is this a nested list? How do I build it? I will try to give some more context on this with some help of examples and screendumps.

FeatureCollectionCalculator

If you open the desired result in an Inspector and look at the single record (top printscreen below), you will notice a difference compared to my current result (bottom printscreen below). My own current result has every featureMember{}.owns in a new column, the desired result doesn’t. But instead has <missing value> in the column GML_parent_property. However, if I doubleclick on both (Feature Information screen opens) the result look largely the same.

RoadNetwork

Similar question as the FeatureCollectionCalculator but with 2 properties (element{}.owns and element{}.xlink_href).

SRM2Road

The printscreen below shows a random lineobject from the desired result. Among the attributes is a kind of list in list named ‘vehicles’ with 5 properties (StandardVehicle.maximumSpeed, StandardVehicle.stagnationFactor, StandardVehicle.strictEnforcement, StandardVehicle.vehiclesPerDay and StandardVehicle.vehicleType). The Vehicles{0} always has properties of Light Traffic, vehicles{1} always has properties of Normal freight etc.

Just like the other examples this appears to be kind of a list. However, if you give the properties the same name for every traffictype, one will overwrite the other. In other words, if I rename the property of both LIGHT_TRAFFIC and NORMAL_FREIGHT to vehicleType the attribute of NORMAL_FREIGHT vehicleType will overwrite the one of LIGHT_TRAFFIC as both ‘columns’ have the same name.

So it looks like I have to change the property name while being in a list somehow? Or is this solved while building the list?

I included some results, a script etc to help you. Inside the zip you will find:

  • AERIUS_Verkeersmodel_TEST_321_output_Totaal.GML my current result (script output)

  • AERIUS_TEST_GML.GML intermediate result (output of the FeatureWriter in my script)

  • NRU_Gebruiksfase_Plan_2025_(vru34)_02-04-2019.GML the desired result.

  • Invulsheet AERIUS.xls User input used for metadata. What’s the name of the project etc.

  • vru34_VRU34_2030B_20_milieu input shape, to be converted to GML.

  • IMAER.XSD the schemadefinition, used in the desired result.

  • AERIUS_Luchtkwaliteit_SHPtoGML.ZIP the FME Workbench (2016.1) and the most recent logfile (the script doesn’t throw any errors at the moment)

     

    Any help is greatly appreciated!

 

Casper

 

Be the first to reply!

Reply