5

I am trying to merge multiple shapefiles into one, but I encounter one error, not all of my shapefiles end up merged. I am able to load all of my shapefiles but when I attempt to merge them, the merged attribute table contains all the information that it should but not all the shapefiles show-up. I made sure to change the the headings in the attribute tables that I want merged.

I have tried to use a number of tools (Merge Shapefiles to One, MMQGIS Combine etc.) but the problems seems to be that some of my shapefiles are projected differently. I have tried to change the coordinate reference system under Properties but after I save the file, the shapefile disappears. I have also found a guide to use GRASS to change the projection but I was not able to follow it.

5
  • What is the error you encounter? Mar 7, 2016 at 20:41
  • I have ward boundaries for 10 cities, when I merge the shapefiles only some of the cities show up not all of them.
    – J.A.
    Mar 7, 2016 at 21:08
  • Part of my files seem to be EPSG: 26917 and ESPG: 4326 format. I can correctly merge all the files that have the 4326 projection and 26917 projection, but I cannot merge all of them together. Nor can I edit the projection, because once I edit the project, under Properties, the shapefile disappears.
    – J.A.
    Mar 7, 2016 at 21:48
  • What CRS system you want to have all merged files: EPSG:26917 or EPSG:4326 ?
    – Artec
    Mar 7, 2016 at 21:55
  • EPSG:4326, I want to import a csv with coordinates to use the information in the attribute table to determine which coordinate falls within certain wards.
    – J.A.
    Mar 7, 2016 at 21:59

2 Answers 2

3

Try do this:

  1. Set Settings>CRS>"Automatically enable on the fly reproject..." and "Prompt for CRS"
  2. Set CRS EPSG:4326 for your project enter image description here
  3. Open your merged EPSG:26917 .shp file and if will be prompted set EPSG:26917. You wouldn't be prompted if this vector has .prj file.
  4. After that you will have reprojected .shp file from EPSG:26917 to EPSG:4326
  5. Save this layer AS...ESRI file and select CRS as EPSG:4326 enter image description here
  6. Remove old layers with EPSG:26917.
  7. Click right mouse button to reprojected layer in legend window and "Zoom to layer". enter image description here
  8. Now you can try merge them all.

Possibly you can use ogr2ogr tool, look at last answer in this post: GDAL OGR2OGR

Update: I downloaded the data from the link and swapped them by description. Look at content of .prj files (open with notepad). After reprojection content should be like ..."GCS_WGS_1984"... not "NAD_1983_UTM_Zone_17N" Link to reprojected data

1
2

I would say that the error occurs because of the conversion from KLM to shape-file.

Make sure that:

a) the KLM-files are not reprojected during conversion to shape. Than you have to define the CRS in QGIS using Vector--> Data management tools --> define projection and choose "UTM Zone 17N NAD 1983". After that you can reproject the shaps like described above.

or

b) to define the projection during the conversion from KLM to shape. Choose e.g. ESPG: 4326.

That should make it work. By the way, you layers do not "disappear" after you changed the projektion in the options menu, there just where relocated to another location du to the new projection. Click on the layer that "disappeared" and choose "zoom to layer" to discover the new location ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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