how to call/using geofield in a custom module
Geofield module is rather complex module which adds a lat/long fieldset and so many other stuff such as adding new fields, validation, etc.
Anyway, you can create a latitude and longitude input field using the #type =&gt; 'geofield_latlon'.
$form['geofield'] = array(
  '#title' =&gt; 'geofield',
  '#type' =&gt; 'geofield_latlon',
);

Note that this will return a generic longitude latitude form. NOT a Google Maps choose-location field.
See geofield.elements.inc for more information on how this element is validated and themed.
Update: I forgot to mention that the above element is available in the 7.x-2.x branch.