docs: @Override
      public void generate(final Module module, final Element element) {
          // this is not necessary, it is done to avoid the namespace definition
          // in every item.
          Element root = element;
          while (root.getParent() != null && root.getParent() instanceof Element) {
              root = (Element) element.getParent();
          }
          root.addNamespaceDeclaration(GeoRSSModule.SIMPLE_NS);
          root.addNamespaceDeclaration(GeoRSSModule.GML_NS);
  
          final Element whereElement = new Element("where", GeoRSSModule.SIMPLE_NS);
          element.addContent(whereElement);
  
          final GeoRSSModule geoRSSModule = (GeoRSSModule) module;
          final AbstractGeometry geometry = geoRSSModule.getGeometry();
  
          if (geometry instanceof Point) {
              final Position pos = ((Point) geometry).getPosition();
  
              final Element pointElement = new Element("Point", GeoRSSModule.GML_NS);
              whereElement.addContent(pointElement);
  
              final Element posElement = new Element("pos", GeoRSSModule.GML_NS);
              posElement.addContent(String.valueOf(pos.getLatitude()) + " " + String.valueOf(pos.getLongitude()));
              pointElement.addContent(posElement);
          }
  
          else if (geometry instanceof LineString) {
              final PositionList posList = ((LineString) geometry).getPositionList();
  
              final Element lineElement = new Element("LineString", GeoRSSModule.GML_NS);
              lineElement.addContent(createPosListElement(posList));
              whereElement.addContent(lineElement);
          } else if (geometry instanceof Polygon) {
              final Element polygonElement = new Element("Polygon", GeoRSSModule.GML_NS);
              {
                  final AbstractRing ring = ((Polygon) geometry).getExterior();
                  if (ring instanceof LinearRing) {
                      final Element exteriorElement = new Element("exterior", GeoRSSModule.GML_NS);
                      polygonElement.addContent(exteriorElement);
                      final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                      exteriorElement.addContent(ringElement);
                      ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));
  
                  } else {
                      System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                  }
              }
              final List<AbstractRing> interiorList = ((Polygon) geometry).getInterior();
              final Iterator<AbstractRing> it = interiorList.iterator();
              while (it.hasNext()) {
                  final AbstractRing ring = it.next();
                  if (ring instanceof LinearRing) {
                      final Element interiorElement = new Element("interior", GeoRSSModule.GML_NS);
                      polygonElement.addContent(interiorElement);
                      final Element ringElement = new Element("LinearRing", GeoRSSModule.GML_NS);
                      interiorElement.addContent(ringElement);
                      ringElement.addContent(createPosListElement(((LinearRing) ring).getPositionList()));
  
                  } else {
                      System.err.println("GeoRSS GML format can't handle rings of type: " + ring.getClass().getName());
                  }
              }
              whereElement.addContent(polygonElement);
          } else if (geometry instanceof Envelope) {
              final Envelope envelope = (Envelope) geometry;
              final Element envelopeElement = new Element("Envelope", GeoRSSModule.GML_NS);
              whereElement.addContent(envelopeElement);
  
              final Element lowerElement = new Element("lowerCorner", GeoRSSModule.GML_NS);
              lowerElement.addContent(String.valueOf(envelope.getMinLatitude()) + " " + String.valueOf(envelope.getMinLongitude()));
              envelopeElement.addContent(lowerElement);
  
              final Element upperElement = new Element("upperCorner", GeoRSSModule.GML_NS);
              upperElement.addContent(String.valueOf(envelope.getMaxLatitude()) + " " + String.valueOf(envelope.getMaxLongitude()));
              envelopeElement.addContent(upperElement);
  
          } else {
              System.err.println("GeoRSS GML format can't handle geometries of type: " + geometry.getClass().getName());
          }
      }