it faled for 'collection' types, and took the chance to also update the case for multilinestring/multipolygon
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | geomFromText_Collection.patch | 982 bytes | strk |
| #2 | geomFromText_Collection.patch | 2.32 KB | strk |
| geometryTypes.patch | 563 bytes | strk |
Comments
Comment #1
strk commentedActually, 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
Comment #2
strk commentedThe attached patch fixes GeoSimple::geomFromText() in a less intrusive way (not changing the constant name).
Comment #3
strk commentedSorry, previous patch contained more changes than the single geomFromText one.
This new one is more limited.
Comment #4
Adam S commentedI 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 messageWrong geometry type. Got GEOMETRYCOLLECTION, was expecting point.Comment #5
strk commentedGEOMETRYCOLLECTION(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.