Skip to main content

GeoAtom1Feed

This class provides a specialized Atom 1.0 feed generator that incorporates GeoRSS capabilities. It extends the standard Atom feed by adding the GeoRSS namespace to the root element and automatically embedding geographic metadata into both the feed and its individual items. This implementation relies on a mixin pattern to handle the specific GeoRSS element serialization.

Methods


root_attributes()

@classmethod
def root_attributes() - > dict

Extends the root element attributes to include the GeoRSS XML namespace declaration.

Returns

TypeDescription
dictA dictionary of attribute names and values for the feed's root element, including the georss namespace.

add_item_elements()

@classmethod
def add_item_elements(
handler: xml.sax.handler.ContentHandler,
item: dict
)

Adds standard Atom item elements and appends GeoRSS geometry information to each entry in the feed.

Parameters

NameTypeDescription
handlerxml.sax.handler.ContentHandlerThe XML handler instance used to generate the feed output.
itemdictA dictionary containing the data for a specific feed entry, including potential geographic coordinates.

add_root_elements()

@classmethod
def add_root_elements(
handler: xml.sax.handler.ContentHandler
)

Adds standard Atom root elements and appends GeoRSS metadata to the top-level feed element.

Parameters

NameTypeDescription
handlerxml.sax.handler.ContentHandlerThe XML handler instance used to generate the feed output.