Geometry errors in the 0010 ConsPUMA shape file

I’ve been working with the 0010 ConsPUMA shapefile for the New York Metro area and have discovered some errors in two shapefile geometries. I posted on stack exchange because I thought the errors were originating from the R package that I was using to map my data, but after further review in QGIS, the errors appear to be originating from the shapefile. There are four points that are self-intersecting rings.

I was wondering if anyone else had problems with this or if someone could look into this?

Best,
Kasey

First, some background: IPUMS derives our U.S. shapefiles from the Census Bureau’s TIGER/Line shapefiles, altering them mainly only by changing the projection (to Albers Equal Area) and erasing coastal water area (so the boundaries terminate at the coasts and Great Lake shores, rather than extending out over water).

In several instances, the TIGER/Line coast closes on itself at a single vertex: instead of an open passage from sea to an inner cove or harbor, the geometry collapses, as in this image:

I took this screenshot at one of the four problem points you reported in your stack exchange post. I looked at all four, and they all have a similar “collapsed” geometry.

In general, this type of geometry causes no errors when working with IPUMS shapefiles in standard GIS software, but apparently R and PostGIS are more strict, treating this type of geometry as an unsupportable error.

That said, I discovered an oddity when reviewing your problem cases: none of the four problem “self intersections” occurred in the two ConsPUMAs that were missing on your map. I suspect that running st_make_valid() fixed the 4 problem cases, but also (for some other reason) deleted the two ConsPUMAs.

I suggest you try to “re-add” those two ConsPUMAs (CPUMA0010 = 592, 593) from the original shapefile into your final shapefile, and see if R will properly map them.

As it happens, when processing our latest IPUMS NHGIS shapefiles (the 2018 versions), I eliminated most–and possibly all–of the self-intersections when I added a new step in our process to systematically delete small interior polygons along the coast. But for NHGIS, we don’t produce shapefiles for ConsPUMAs, only for PUMAs and other standard census units. Still, if my first suggestion doesn’t work, you could also try to construct new “valid” ConsPUMAs by obtaining the 2018 PUMA shapefile from NHGIS, and then dissolving the PUMAs into ConsPUMAs. (You can identify which PUMAs are in each ConsPUMA using the components file from this page. Note that the 2018 PUMA shapefile represents 2010 PUMAs.)