it faled for 'collection' types, and took the chance to also update the case for multilinestring/multipolygon

Comments

strk’s picture

Actually, the problem here is that GeomSimple::geoFromText takes the WKT exterior label and sees
if a constant GEO_TYPE_ exists.

In the GEOMETRYCOLLECTION(...) WKT case, GEO_TYPE_GEOMETRYCOLLECTION is checked for, which
doesn't exist as the variable is called GEO_TYPE_COLLECTION instead.

Not sure it is safe to rename the constant

strk’s picture

StatusFileSize
new2.32 KB

The attached patch fixes GeoSimple::geomFromText() in a less intrusive way (not changing the constant name).

strk’s picture

StatusFileSize
new982 bytes

Sorry, previous patch contained more changes than the single geomFromText one.
This new one is more limited.

Adam S’s picture

I can not figure out how to get the dev version of geo to work. Looks like it is missing some files. I have Openlayers, Openlayers geocoder, Views, CCK, token and Geo installed. I'm trying to use the geocoder to populate the WKT field. It's returning GEOMETRYCOLLECTION(POINT(-71.0597732 42.3584308)) which is not validating. POINT(-71.0597732 42.3584308) does validate. I tried to install the patch but realized I needed .dev which doesn't have the files necessary. I'm getting this message Wrong geometry type. Got GEOMETRYCOLLECTION, was expecting point.

strk’s picture

GEOMETRYCOLLECTION(POINT(-71.0597732 42.3584308))

The above WKT is perfectly valid. If GEO module doesn't validate it is a bug.
The patch, according to Version field, is against the DRUPAL-6--1 branch.