1

I have some 50 GML files in my downloads folder, each within a child folder such as:

Downloads\Adur\Land_Registry_Cadastral_Parcels.gml
Downloads\Abertawe_-_Swansea\Land_Registry_Cadastral_Parcels.gml
Downloads\Allendale\Land_Registry_Cadastral_Parcels.gml
etc...

I want to import all 50 GML files into a public schema as a batch command. I want to name each table as per the child folder (Adur, Abertawe_-_Swansea, Allendale etc) rather than the GML file itself. The DB has the PostGIS extension enabled. I'm using pgAdmin 4 as my visual SQL DB and expecting an idiot's guide on how to do this.

Padmanabha
1,4083 gold badges11 silver badges20 bronze badges
asked Apr 4, 2021 at 18:28
3
  • 1
    If using QGIS this can be done in the DB Manager with PostGIS connection Commented Apr 4, 2021 at 21:17
  • I see I can open the SQL query window there too but I wouldn't know what to type! Commented Apr 5, 2021 at 8:56
  • Install QGIS. Then you have multiple import options Commented Apr 6, 2021 at 6:49

1 Answer 1

1

Loading via DBManager in QGIS

use the Import Layer/File

enter image description here

Importing takes about 50 seconds.

enter image description here

This method allows for multiple files to be selected. (Or just merge all .gml files in QGIS)

answered Apr 5, 2021 at 15:38
1
  • Thanks Mapperz, this is the last resort I would have defaulted to myself - as you found and downloaded the inspire dataset for one local authority, you'll appreciate that merging all freehold titles for the UK will take some time! Commented Apr 6, 2021 at 10:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.