Bizarre GeoServer WMS rendering possibly due to ArcGIS handling of PostGIS data

I just submitted a problem to the OpenGeo support forum regarding an unusual bug I’ve discovered in GeoServer. Multipart polygon geometries are producing “unintentional art” when rendered through GeoServer.

NJ Landscape Project data improperly rendered.

Several GIS data sets that have been brought into PostGIS using ArcGIS 10.0 (with the PG_GEOMETRY keyword) have then exhibited some bizarre rendering issues when rendered using GeoServer. Above, the Landscape Project data appears to have some random triangular polygons that stretch beyond New Jersey’s western border. We used ArcGIS to process this layer as I wanted a Union (ESRI not PostGIS terminology) between Landscape and NJ’s municipality layer. ArcGIS Desktop’s method of storing multipart polygons in PostGIS seems valid – the table renders just fine in ArcGIS Desktop and QGIS – but is a little different than what GeoServer’s rendering engine is expecting.

Here’s a “fixed” version that enables GeoServer to render the data correctly.

Proper way to render Landscape Project data.

The “fix” comes in the form of a simple table view. By forcing the geometry field through ST_Force_Collection and then setting the table view up as a new WMS layer, the problem polygons disappear. Frankly, I was surprised this worked, but I assumed that if ArcGIS and QGIS could handle the data, the problem wasn’t the data, but GeoServer’s ability to process it. ST_Force_Collection is just enough to massage the data into a GeoServer-friendly form.

I’m not sure if it’s something to do with ArcGIS’s PostGIS support directly, but I have already experienced issues with weirdness due to inconsistent handling of circular features between ArcGIS, PostGIS and OGR. I’m going to generate a shapefile of some bizarre multipart shapes and see how the shapes are handled via SDE & PG_GEOMETRY and well as OGR to PostGIS. I’ll share my findings here along with the source data.

This entry was posted in Data, Technology, Visualization, Web Mapping and tagged , , , , , . Bookmark the permalink.

1 Response to Bizarre GeoServer WMS rendering possibly due to ArcGIS handling of PostGIS data

  1. Cindy Fowler says:

    Sounds like a problem we are having with AIS data layer in MarineCadstre.gov app. Seems we hit a limit on the # of polygons? Esri suggested that we cache layer. Haven’t tried yet, but interesting your problem looks similar.

Comments are closed.