MultiPoint parsing requires parentheses around Points #18

dark-panda opened this Issue Dec 16, 2011 · 2 comments


None yet

2 participants


Although the OGC spec itself [1] appears to require that Points in a MultiPoint are surrounded by parentheses, actual implementations in the wild seem to make them optional. The following are both parsed successfully by GEOS and PostGIS for instance:

select ST_AsText('MULTIPOINT (0 0, 2 3)');
-- => MULTIPOINT(0 0,2 3)

select ST_AsText('MULTIPOINT ((0 0), (2 3))');
-- => MULTIPOINT(0 0,2 3)

ST_AsText and ST_AsEWKT also output MultiPoints without parentheses. SQL Server apparently accepts both formats as well [2], although I can't confirm that directly.

RGeo appears to require the parentheses and will throw an exception without them:

RGeo::Cartesian.factory.parse_wkt('MULTIPOINT (0 0, 2 3)')
# => RGeo::Error::ParseError: :begin expected but 0.0 found.

While it might not be strictly kosher according to the OGC specs, the fact is that these parentheses are used in the wild, so it might be prudent to have RGeo recognize both formats as well.


RGeo member

Thanks J. Yeah, I did the implementation based on the spec and without the benefit of knowing what else is out in the wild. I'll go ahead and loosen RGeo's parser.

RGeo member

Fixed in rgeo 0.3.3

@dazuma dazuma closed this Dec 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment