-1

I have attached a short text from XML file. Can this file be transferred to the spatial domain?

example

How to convert XML files in to shapefiles using ArcGIS or FME?

2
  • It would be great to provide some sample data rather than the screenshot to show you how it is done with FME. Thanks.
    – GforGIS
    Commented Mar 17, 2020 at 10:11
  • 1
    This question is both too broad (from the respect that is asks about two software ptoducts) and needs details (from the respect that "Is this possible?" questions can pretty much only be answered, "Yes, of course", "Yes, with some effort", or "Yes, with a tremendous amount of effort"). GIS SE is a problem-solving site, and you haven't specified a problem, just a task. When you choose a software framework and attempt to complete the task is the point at which you may begin to encounter a problem.
    – Vince
    Commented Mar 17, 2020 at 10:11

1 Answer 1

1

(Well, re-reading your question and looking a bit into fme, it may be that the first part here does not answer your need as there may be simpler ways of doing it - you still need to get in X and Y as easting and northing coordinates and find the right CRS)

It definately is doable, but "some assembly needed"...

I assume that what you want are the X and Y attributes within the position element as point coordinates. That can be done using an xml parser, or if you are sure your xml always looks like this, you can even do a brute force reading, it may be easier if you are not used to the xml-parser, but it is (much) more fragile, more dependent on the exact structure of the file. In the same round you can pull out other attributes if they are of interest. If I was to do this, I would probably use python - 15 lines or something - also depending a bit if it is a one-off thing or if this is something you have to redo more or less frequently.

To get it as geographical information, you also need to know the CRS for the coordinates. Since I recognice a bit of Swedish in the xml, I would guess UTM zone 34N or 35N, probably WGS 84 but it may also be ERTS89 - that may be a few meters off - which might or might not matter depending on what you are using the data for. If you have any idea of where the data are or should be, you will easily see if they end up as the wrong UTM zone.

3
  • I have access to Arcgis and FME and I am newbie to XML but I need to convert xml files to shape files. When I am trying to import this xml files in to geodatabases by using tool called import xml , It is showing error of its not a correct format.
    – MapQuest
    Commented Mar 17, 2020 at 11:36
  • Yes, you are correct. The CRS is UTM 33N and its somewhere in Sweden. I am looking for some suggestions which can be done by using the software. I am not good in programming.
    – MapQuest
    Commented Mar 17, 2020 at 11:38
  • I do not know FME too well, it might - or might not - be able to read in your data. The problem with xml "format" is that xml does really not define a format, it just define a way of defining formats... So when you try to read it into the geodatabase, the import tool needs to know which parts to read as coordinates and attributes for your data, so something like a general xml importer is not possible. (But I do not know the details, I have not been using arcgis for a long time) Commented Mar 17, 2020 at 11:47

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