I was trying to use twkt to serialize a geometrycollection of multipolygons. At first, I was looking at the serialization on client side. After more investigation, it seems this is not managed correctly (or as I expected it).
The proof? See this additional tests on my fork webgeodatavore@8d0e638#diff-20139373d7d13bbc72485ffbafed376dR108
I've included 2 tests. The first one fails with a "TypeError: geoms.map is not a function"
IMHO, the spec is not really clear about allowing to nest a "multi" within a geometrycollection. So, I don't know if the issue is my interpretation or in the code.
GeoJSON specs does not recommend this case but as the serialization in PostGIS is done by providing a collection of geometry and ids, I would not expect to only support geometrycollection of simple geometries on client side.
If you consider my issue as valid, I will make a PR with my commit to introduce the 2 additional tests including the failing one and will investigate to fix (already some clues but do not want to fix before it's confirmed)
I was trying to use twkt to serialize a geometrycollection of multipolygons. At first, I was looking at the serialization on client side. After more investigation, it seems this is not managed correctly (or as I expected it).
The proof? See this additional tests on my fork webgeodatavore@8d0e638#diff-20139373d7d13bbc72485ffbafed376dR108
I've included 2 tests. The first one fails with a "TypeError: geoms.map is not a function"
IMHO, the spec is not really clear about allowing to nest a "multi" within a geometrycollection. So, I don't know if the issue is my interpretation or in the code.
GeoJSON specs does not recommend this case but as the serialization in PostGIS is done by providing a collection of geometry and ids, I would not expect to only support geometrycollection of simple geometries on client side.
If you consider my issue as valid, I will make a PR with my commit to introduce the 2 additional tests including the failing one and will investigate to fix (already some clues but do not want to fix before it's confirmed)