Geo provides the function geo_wkb_get_data($wkb, $format) to translate Well Known Binary (WKB, the format used to store geographic features in the database) into various formats that you can use. Most of the time you should not need to use this, because when you write a field formatter you can request geodata in a specific format from Geo. Do this by adding 'gis types' and 'gis input' elements to your field formatter's entry in hook_field_formatter_info():
function gmap_geo_field_formatter_info() {<br />
return array(<br />
'gmap_geo' => array(<br />
'label' => t('GMap'),<br />
'field types' => array('geo', 'geo_data'),<br />
'multiple values' => CONTENT_HANDLE_MODULE,<br />
'gis types' => array('point', 'linestring', 'polygon'),<br />
'gis input' => 'array'<br />
),<br />
);<br />
}When this is done, Geo will automatically turn the field's WKB into the requested format; for example, if you put 'gis input' => 'array', Geo will parse the WKB stored in the database into an array, and hand it off to you in your $element:
function theme_gmap_geo_formatter($element) {<br />
foreach (element_children($element) as $i) {<br />
$item = $element[$i]['#item'];<br />
// $element[$i]['#item']['array'] = Geo-generated array describing the feature<br />
...Behind the scenes, Geo is calling geo_wkb_get_data($wkb, 'array') on your behalf. See the page on
