I am trying to plot the German Railway net from here, using GeoPandas. It downloads an Inspire XML file. gpd.read_file
only seems to read the header. Importing it as a Pandas Dataframe with pd.read_XML
comes up with NaN's only.
How can I read Inspire XML files using GeoPandas?
Best Answer
This is a GML file with layers. To read a layer, pass the layer name:
I'm not sure how to get all the layer names in python, but
ogrinfo
at the command line will do this for me:What you are seeing without a layer option is the first layer, which has no geometry. How the various layers relate will be in the documentation.