docs: @SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity", "checkstyle:nestedifdepth", "resource"})
  	public static <T extends MapElement> void readGISElementContainer(Element xmlNode,
  			GISElementContainer<T> primitive, String elementNodeName, PathBuilder pathBuilder,
  			XMLResources resources) throws IOException {
  		// Build the reader for the attributes
  		DBaseFileReader attrReader = null;
  		URL attrSourceURL = null;
  		String sattr = XMLUtil.getAttributeValueWithDefault(xmlNode, null, MapElementLayer.ATTR_ELEMENT_ATTRIBUTES_URL);
  		if (sattr != null && sattr.length() > 0) {
  			if (XMLResources.isStringIdentifier(sattr)) {
  				final long id = XMLResources.getNumericalIdentifier(sattr);
  				final Entry resource = resources.getResource(id);
  				if (resource != null) {
  					if (resource.isURL()) {
  						attrSourceURL = pathBuilder.makeAbsolute(resource.getURL());
  						if (attrSourceURL != null) {
  							attrReader = new DBaseFileReader(attrSourceURL);
  						}
  					} else if (resource.isFile()) {
  						attrSourceURL = pathBuilder.makeAbsolute(resource.getFile());
  						if (attrSourceURL != null) {
  							attrReader = new DBaseFileReader(attrSourceURL);
  						}
  					} else if (resource.isEmbeddedData()) {
  						final ByteArrayInputStream bais = new ByteArrayInputStream(resource.getEmbeddedData());
  						attrReader = new DBaseFileReader(bais);
  					} else {
  						throw new IOException("unsupported resource type: " + sattr); //$NON-NLS-1$
  					}
  				} else {
  					throw new IOException("resource not found: " + sattr); //$NON-NLS-1$
  				}
  			} else {
  				attrSourceURL = pathBuilder.makeAbsolute(sattr);
  				if (attrSourceURL != null) {
  					attrReader = new DBaseFileReader(attrSourceURL);
  				} else {
  					throw new IOException("resource not found: " + sattr); //$NON-NLS-1$
  				}
  			}
  		}
  
  		// Retrieve the map projection
  		final MapMetricProjection mapProjection = XMLUtil.getAttributeEnumWithDefault(xmlNode, MapMetricProjection.class,
  				MapMetricProjection.getDefault(), MapElementLayer.ATTR_ELEMENT_GEOMETRY_PROJECTION);
  
  		// Build the reader for the shapes
  		GISShapeFileReader shapeReader = null;
  		URL shapeSourceURL = null;
  		sattr = XMLUtil.getAttributeValueWithDefault(xmlNode, null, MapElementLayer.ATTR_ELEMENT_GEOMETRY_URL);
  		if (sattr != null && sattr.length() > 0) {
  			if (XMLResources.isStringIdentifier(sattr)) {
  				final long id = XMLResources.getNumericalIdentifier(sattr);
  				final Entry resource = resources.getResource(id);
  				if (resource != null) {
  					if (resource.isURL()) {
  						shapeSourceURL = pathBuilder.makeAbsolute(resource.getURL());
  						if (shapeSourceURL != null) {
  							shapeReader = createShapeReader(shapeSourceURL, primitive.getElementType(), attrReader,
  									attrSourceURL, mapProjection);
  						}
  					} else if (resource.isFile()) {
  						shapeSourceURL = pathBuilder.makeAbsolute(resource.getFile());
  						if (shapeSourceURL != null) {
  							shapeReader = createShapeReader(shapeSourceURL, primitive.getElementType(), attrReader,
  									attrSourceURL, mapProjection);
  						}
  					} else if (resource.isEmbeddedData()) {
  						final ByteArrayInputStream bais = new ByteArrayInputStream(resource.getEmbeddedData());
  						shapeReader = createShapeReader(bais, primitive.getElementType(), attrReader,
  								attrSourceURL, mapProjection);
  					} else {
  						throw new IOException("unsupported resource type: " + sattr); //$NON-NLS-1$
  					}
  				} else {
  					throw new IOException("resource not found: " + sattr); //$NON-NLS-1$
  				}
  			} else {
  				shapeSourceURL = pathBuilder.makeAbsolute(sattr);
  				if (shapeSourceURL != null) {
  					shapeReader = createShapeReader(shapeSourceURL, primitive.getElementType(), attrReader,
  							attrSourceURL, mapProjection);
  				} else {
  					throw new IOException("resource not found: " + sattr); //$NON-NLS-1$
  				}
  			}
  		} else {
  			attrSourceURL = null;
  		}
  
  		primitive.setElementGeometrySource(shapeSourceURL, mapProjection);
  		primitive.setElementAttributeSourceURL(attrSourceURL);
  
  		if (shapeReader != null) {
  			final Iterator<? extends T> iterator = shapeReader.iterator(primitive.getElementType());
  			while (iterator.hasNext()) {
  				primitive.addMapElement(iterator.next());
  			}
  			shapeReader.close();
  		}
  
  		// Read embedded elements
  		final String enm;
  		final String enmDefault = getDefaultMapElementNodeName(primitive.getElementType());
  		if (Strings.isNullOrEmpty(elementNodeName)) {
  			enm = enmDefault;
  		} else {
  			enm = elementNodeName;
  		}
  		T mapElement;
  		for (final Element elementNode : XMLUtil.getElementsFromPath(xmlNode, NODE_ELEMENTS, enm)) {
  			mapElement = XMLGISElementUtil.readMapElement(elementNode,
  					enmDefault, primitive.getElementType(), pathBuilder, resources);
  			if (mapElement != null) {
  				primitive.addMapElement(mapElement);
  			}
  		}
  	}