import csv file to geofield

leofishman's picture


I have to import information in a csv with poligones information to node with a geofield field.

I have tried feeds import and gdal, but gdal doesn't recognize the kml field.

A sample file with 3 records is attached.

Can anyone help me with feeds or with a migrate module?



I imported the kml data to a text field and extracted the information with geofield from another field!
I uploaded the module and the image of the secciones content type
for this to work, you need migrate_extras module

test.csv13.19 KB
content_type_secciones.png39.66 KB
migrate_kml.gz1.2 KB


Hi Leo, To import geospatial

azuledu's picture

Hi Leo,

To import geospatial data stored in a KML field from a CSV file, you can use Feeds+PostGIS modules (GDAL is not necessary).

As is explained in the GDAL documentation ( the GDAL module only knows how to work with OGR vector formats ( The CSV value format only works with WKT (

I'm not sure if this helps you..

I can't install postGIS

leofishman's picture

I can't install postGIS server or postgress.


Migrate Extras

leofishman's picture

Finally I made a migrate custom module, I had a text field to store the KML and then a geofield Geocode from another field and worked like a charm!

Good! Is it possible to

azuledu's picture

Is it possible to contribute it to Drupal in some way? Maybe some code to Geofield module or some HowTo in the documentation.

I uploaded my module to the original post

leofishman's picture

Sorry for the delay, just saw this message.

I uploaded the module, an image of the secciones content type and the original csv used to import.

I could import it to a text field named field_kkk and then the field_kml_secciones geocode from that field!

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week