JOINING TWO .SHP FILES

JOINING TWO .SHP FILES

Anonymous
Not applicable
4,969 Views
11 Replies
Message 1 of 12

JOINING TWO .SHP FILES

Anonymous
Not applicable

I have two point .shp files that have the same format (same headers) and data associated with each. I would like to join them into one .sdf. They have the same headers. When I try and mapexport to a single .sdf, the info only comes in for one of the .shp files but all the points are there. Any help would be appreciated.

 

Thanks,

 

MS

0 Likes
Accepted solutions (1)
4,970 Views
11 Replies
Replies (11)
Message 2 of 12

parkr4st
Advisor
Advisor

There is no data associated with the points.  check your files and make sure the data is attached and repost them

 

dave

0 Likes
Message 3 of 12

Anonymous
Not applicable

Hi,

 

do you want to merge both SHPs into one single feature class in SDF or do you just want two features classes in one SDF?
Can you explain how you perform MapExport? Which settings are you using?
What dou you mean by "header" - attribute table structure?

 

You also could try to attach both SHP files per FDO and the perform a GIS Ovleray "Union".

 

By the way - is the data set related to CT/SA?

 

Rob

 

Message 4 of 12

kajar
Advocate
Advocate

You can use bulk copy  to join two .shp files together. Just copy data frim one shp to second shp and then you can save target .shp layer as .sdf.

Kajar

0 Likes
Message 5 of 12

scheel
Advocate
Advocate

Sorry, but Bulk copy cannot copy objects in a shp file, when it is not empty.

 

The solution is to work with a sqlite or sdf file as a buffer.

Copy first one of both shp files in a sdf file using bulkcopy.

Then you can append the second shp file data using buld copy and you has to answer the question "replace or append" with teh answer "append".

When you then need a shp file as result, you have to use a empty directory to connect as shp project and use bulkcopy to copy in a new shp file.

 

A easier way is offered by our Tools4GIS. There you can copy directly from one shp file into another shp file and both can be filled with data.

 

Thorsten

Thorsten Scheel
Contelos GmbH













0 Likes
Message 6 of 12

Pointdump
Consultant
Consultant
Accepted solution

MS,

 

To be useful your shapes need 4 files: SHP, DBF, SHX, and PRJ. Zip them together and post.

 

Generic answer to your question is to do a Table Join:
https://knowledge.autodesk.com/support/autocad-map-3d/learn-explore/caas/CloudHelp/cloudhelp/2015/EN...

 

The easiest way to combine two shapes is in the free QGIS:
http://www.igismap.com/merge-two-shapefile-qgis/

 

Or merge data in Excel:
https://www.youtube.com/watch?v=A-HOpncSoxM


Dave

Dave Stoll
Las Vegas, Nevada

EESignature

64GB DDR4 2400MHz ECC SoDIMM / 1TB SSD
NVIDIA Quadro P5000 16GB
Windows 10 Pro 64 / Civil 3D 2025
0 Likes
Message 7 of 12

kajar
Advocate
Advocate
I just did direct bulk copy from one shp to anotther shp(not empty), so its possible.
0 Likes
Message 8 of 12

Anonymous
Not applicable

shp & shx filesshp & shx files.lin file.lin file

 

How can I combine all the shp & shx files? Can I make one master .shx file? 

-Adam 

0 Likes
Message 9 of 12

kajar
Advocate
Advocate

You can import(mapimport) all shp files with all attribute data(object data) included. Each class is imported as separate layer.

Now you can use mapexport to export all layers together into .sqlite or .sdf file. 

 

 

Kajar

 

 

0 Likes
Message 10 of 12

Murph_Map
Mentor
Mentor

The image is showing AutoCAD shape files(linetype/symbols) not ESRI (GIS) shape files, there is a big differences. For the AutoCAD shape files you need to open each one in notepad or other text editor and do a copy/paste into one file. 

Murph
Supporting the troops daily.
Message 11 of 12

Anonymous
Not applicable

@Murph_Map Would I open one .shx file and copy all the other .shx text into the one file?  Then path all my linetypes in the .lin that have .shx to the the one master .shx file?  Thanks for the help!

 

-Adam

0 Likes
Message 12 of 12

Murph_Map
Mentor
Mentor

I would create a new text file then copy the others into that. This way you still have the original files. Make sure you put the new shp/shx file in your Autocad support path.

Murph
Supporting the troops daily.
0 Likes