Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Some background: I have 2 polygon shape files with approximately 500,000 records each. The two files are identical in terms of field structure.

Using ArcGIS 10.0 I can'nt merge these two files using Geoprocessing / Merge. ArcMap allways crashes somewhere in the middle of the process.

Is there any open source software that can do this job? QGIS has the function: Vector/ Merging shape file into one , but there was a reported bug with this function in the current version 1.7. I know GDAL can do a lot of things and wonder if GDAL or some other opensource software can do this properly.

share|improve this question
4  
is there a chance that you are exceeding the 2 Gb limit for shapefiles? –  Dan Patterson May 8 '12 at 14:42

4 Answers 4

up vote 18 down vote accepted

From the GDAL manual:

A merge of two shapefiles 'file1.shp' and 'file2.shp' into a new file 'file_merged.shp' is performed like this:

% ogr2ogr file_merged.shp file1.shp
% ogr2ogr -update -append file_merged.shp file2.shp -nln file_merged

The second command is opening file_merged.shp in update mode, and trying to find existing layers and append the features being copied.

The -nln option sets the name of the layer to be copied to.

http://www.gdal.org/ogr/drv_shapefile.html

share|improve this answer
2  
--skipfailures makes sure you continue if you encounter a bad record, too. I would add it if the process is taking too long. –  Ragi Yaser Burhum May 8 '12 at 15:56
    
Thanks jzl5325, this is what I was looking for (beside the alternative to do it in ArcMap). I think there is a good demand for a task-oriented manual/userguide for GDAL rather than syntax. Something like the one in your answer that begin with a task: i.e. to merge 2 shp file, to convert from mapinfo tab to esri shp. A long list of "to do this with GDAL" will be very useful. –  anh.hv May 9 '12 at 10:17
    
@anh.hv Agreed. Something I would love to do if I had a bit more time. I suspect that something like that will not happen until A)it is a part of some college coursework or B)It gets funded by a sponsor to GDAL. –  Jay Laura May 9 '12 at 20:13

You could try Geomerge. I'm not sure how many records it can handle, but so long as the table structure is the same for all files I have not had any problems with it.

The MapBrowser available on the same website is also an excellent little tool for quick viewing of shapefiles without having to open up a GIS package.

share|improve this answer

As Kevin said converting the shape files into fGDB is the best option. (It will be very fast compared to shp files)

Because, Shape files have a limitation in the storage capacity, i think your two shapes files (after merge) is beyond this limit. Pls. check that.

share|improve this answer

Try converting the shapefiles to a file geodatabase and then merge them in ArcGIS.

You may even be able to convert them back to shape after the merge (in case you're trying to maintain compatibility with other software that relies on shapefiles).

share|improve this answer
    
Thanks Kevin and @vadivelan. Putting shp into file geodatabase really work. It also reduce the sized of the merged file by 4 time compare to the 2 original shape files. –  anh.hv May 9 '12 at 10:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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