1

I want to import this file into ArcMap 10.4. On the page it says it's a csv, when downloaded it's a .text-file. I renamed it to GML, as they usually have GML on that platform, and the file content looks like GML to me.

Using Add Data in Arc Map (Data Interoperability Extension is activated), i get a mirrored version of the data, with no spatial reference.

enter image description here

It's supposed to look look like this.

How do I fix this?

  • The page you are referring to is suche.transparenz.hamburg.de/dataset/… ? Yeah, it's GML, not CSV. Make sure you use the correct CRS, it is EPSG:3044 – bugmenot123 Feb 23 '17 at 10:40
  • I made a new Projekt, and changed the data frame CRS to ETRS_1989_ETRS-TM32 (which is supposedly EPSG:3044). Then i added the GML via Add Data. It still displays at the same off position, somewhere off the coast of Somalia... am I doing something wrong? I also tried exporting to a new shpfile, and setting the CRS in Arc Catalog to ETRS_1989_ETRS-TM32 once again, still the same position. – kett Feb 23 '17 at 14:58
  • I found the problem in the file. See my answer below. – kett Mar 6 '17 at 11:31
2

I found the problem in the GML file.

The Lat/Lon float values were in the wrong order, so each latitude value was interpreted as longitude and vice versa.

I wrote a regular expression, to switch the values and applied it to the GML with Notepad++.

This is the Regular expression. May it be a help to anyone, who finds this:

  • Find: ([-]*[0-9]+\.[0-9]+)\s([-]*[0-9]+\.?[0-9]+)
  • Replace with: \2 \1

Using Replace Dialog in Notepad++ to apply the regular expression to the GML file: Using Replace Dialog in Notepad++ to apply the regular expression to the GML file.

Example of what it does:

  • given:5939544.160688 576255.677226
  • result:576255.677226 5939544.160688

Now the file can be imported into the GIS. If the coordinates are comma seperated, just replace the \s with a comma.

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.