create shapefile representing land with empty areas where lakes are

1166
4
Jump to solution
07-14-2023 11:22 AM
Labels (1)
RickCheney
Occasional Contributor III

I have a shapefile with lakes.  I have another shapefile which is the same area as the other shapefile.  I would like to use some sort of mask or extract, etc., tool to create a new shapefile which represents the land.  The new shapefile will contain everything that is not in the lakes shapefile.

I've tried using Clip and Extract and Intersecting Layers and Symmetrical Differences tools but I was only able to get the "Islands" that are in the lakes shapefile.  Can anyone recommend an ArcMap tool?

In the attached file, the blue represents the lakes.  I am trying to create a shapefile that would contain all the white areas of the image.

Tags (2)
0 Kudos
2 Solutions

Accepted Solutions
JimCousins
MVP Regular Contributor

RickCheney, You can use the union tool for this. Add an attribute column to each shapefile, and populate it  with a unique attribute like "Water" for your water shapefile and "Background" for the other. Run the union and leave the "JoinAttributes" option as "ALL". Then use a definition query such as "(your column name)" <> 'Water'. This will give you your background with the water polygons punched out. 

Regards

View solution in original post

RickCheney
Occasional Contributor III

Thank You so much!  I used the Union (Analysis) Tool.  I added a column titled Land to the shapefile that is a solid background and a column titled Water to the shapefile of the Lakes.   Then in Layer Properties of the newly created shapefile (the "union" shapefile), I used the Definition Query tab and Query Builder.  At first it didn't work and then I realized that I had to populate the Attribute Table with something in the fields of the newly added column.  There are thousands of rows in the lakes attribute table and I didn't know how to auto-add something to each field of the new column, so I found an existing column that had the same value in each field of a column that was unique to that attribute table and did not exist in the other attribute table, then it worked perfectly!!

View solution in original post

0 Kudos
4 Replies
PaulLohr
Occasional Contributor III

Here's something to consider. Try creating a new polygon shapefile with a shape that exceeds all of your Lakes and exceeds the extent which your Land should cover. Use the Erase tool with the new shapefile as Input Features and the Lakes as Erase Features. This will create polygons covering the white (from your graphic). But you will still have to trim the land areas back to reality. I think you'll see what I mean after going through these steps.

Oh, the Erase tool requires the Advanced license level. If you don't have that, the Difference GP tool in QGIS should do the same thing.

RickCheney
Occasional Contributor III

Thank you so much for your help.  Created a new shapefile as you described.  Then, I tried the Erase (Analysis) Tool.  The result was a file that contained only the "islands" that are within the lakes.

0 Kudos
JimCousins
MVP Regular Contributor

RickCheney, You can use the union tool for this. Add an attribute column to each shapefile, and populate it  with a unique attribute like "Water" for your water shapefile and "Background" for the other. Run the union and leave the "JoinAttributes" option as "ALL". Then use a definition query such as "(your column name)" <> 'Water'. This will give you your background with the water polygons punched out. 

Regards

RickCheney
Occasional Contributor III

Thank You so much!  I used the Union (Analysis) Tool.  I added a column titled Land to the shapefile that is a solid background and a column titled Water to the shapefile of the Lakes.   Then in Layer Properties of the newly created shapefile (the "union" shapefile), I used the Definition Query tab and Query Builder.  At first it didn't work and then I realized that I had to populate the Attribute Table with something in the fields of the newly added column.  There are thousands of rows in the lakes attribute table and I didn't know how to auto-add something to each field of the new column, so I found an existing column that had the same value in each field of a column that was unique to that attribute table and did not exist in the other attribute table, then it worked perfectly!!

0 Kudos