We are trying to import a large taxonomy of regions. The vocab has been defined and a geofield added to store the bounding box values for each term(region).
Geofield stores this data in two structures: a WKT (well known text) string which is ideal for import/export. A sample looks like this:
POLYGON ((130.18 -16.15, 133.52 -16.15, 133.52 -13.25, 130.18 -13.25, 130.18 -16.15))
When a user manually creates a new term, what they enter are the bounds (bounding box) values in four fields:
North, South, West, East (or top,bottom,left,right)
On [Save], GeoField creates the WKT string and stores it. See screenshot attached for an example of the storage as seen in Devel>Load
So: the problem is in the import/export logic (I think) because all we're seeing is the WKT string being imported. Here's how we've tested it:
Starting with the vocab and fields all set up, and a test term manually created...
When we export the vocab via this module, the geofield_bounds column contains only WKT string (not the four individual bounds).
So we set up an import file with the WKT string and run the import
The result is that only the WKT value is added to the field: the bounds values are not calculated and populated into their component fields.
So the Bounds values are all shown as NULL, and of course there is no display on the map.
I'm not sure if there's a way to 'touch' or refresh the geofield so that it computes the bounds values itself, but this seems like a long shot?
That's as far as I can go unfortunately.
Wish we could be of more help, but at this point I just have to ask you for clues?
Thanks,
JB
| Comment | File | Size | Author |
|---|---|---|---|
| geofield-wkt.png | 54.72 KB | boabjohn |
Comments
Comment #1
Daniel_KM commentedHi,
I don't find why the import doesn't work.
Have you tried the last dev version?
Sincerely,
Daniel Berthereau
Infodoc & Knowledge management