2

I have data in xml format which contains a child element "GEOM" which has coordinates in the following format

POINT (9.9632253030540205 52.9569277022282421)

POLYGON ((9.7423702151211078 53.0121955350022205, 9.7434299430377305 53.0116226800417607, 9.7419839466114624 53.0117578529546236, 9.7416965815231169 53.0120388635930269, 9.7423702151211078 53.0121955350022205))

LINESTRING (10.1563217305953994 52.6132026962184227, 10.1562498991917636 52.6133444920414988, 10.1562499164679956 52.6134644695202240, 10.1564744722547857 52.6135953416881534, 10.1566720631912712 52.6135844241491171, 10.1568606616562924 52.6134971580102473, 10.1569414808197767 52.6133989904039652, 10.1569953469126961 52.6132408350926326, 10.1570132855248811 52.6130717740015399, 10.1567528163921743 52.6130281593698683, 10.1564564331277936 52.6130663501461342, 10.1563576580763968 52.6132136013941718)

I can parse the table into csv or xls but how can I transform this format into SHP?

  • 1
    Would you be able to edit your question to include the GIS software and version that you are using, please? – PolyGeo Jul 22 '14 at 11:02
  • 1
    looks like GML to me – Ian Turton Jul 22 '14 at 11:02
  • I have ArcInfo 10.0 and FME 2014 – Robert Buckley Jul 22 '14 at 11:05
  • I used xml-converter.com to convert the xml to xls – Robert Buckley Jul 22 '14 at 11:11
  • The ASCII payload is Well-Known Text – Vince Jul 22 '14 at 11:47
2

The point feature is a bit more straight forward once you have your table in excel (with your X and Y columns), save it out as a .csv and you may use the Make XY Event Layer tool to convert to event layer and then use Feature Class to Feature Class tool to convert to shapefile.

The polyline and polygon are not as straight forward, you will have to build a empty feature class (polyline and polygon) to hold the geometry and then use python to write the geometry using a Insert Cursor. Here are some example links for writing the geometry.

Writing geometries

4.3 Writing geometries (PSU)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.