Solved

Pass geometry and coordinate system when converting from XML

  • 3 April 2018
  • 1 reply
  • 4 views

Badge +14
  • Contributor
  • 120 replies

I am trying to convert a dataset from XML (KuntaGML) to shape but cant get it to behave properly. I am using a dynamic workspace and the output is 80:ish shapefiles. Everything exports but loses its coordinate system and gets is geometry from the first feature read. I have tried adding the desired coordinate system up in the left corner of the workspace but it only seems to be written to half, or so, of the files output. As for the geometry I have tried both "from schema" and "first feature defines geometry" none of them make any difference, everything is output as points, even though all geometries are in the XML.

What am I doing wrong?

icon

Best answer by jdh 3 April 2018, 19:07

View original

1 reply

Badge +22

You can use the CoordinateSystemSetter transformer on the features directly.

For the geometry issue, that's related to the fact that shapefiles can only support one geometry type. You need to make sure that the different geometry types have different shapefile names. You can do this implicitly with a dynamic schema, or explicitly with a geometryFilter and a different writer feature type for each geometry.

Reply