Hi there,
Today I noticed something peculiar when working with data from a PostgreSQL DB (that includes the PostGIS extension).
Initially I used the PostgreSQL reader in an SQLExecutor to query for some specific data, and also included the geometry column 'standardized_location’ in the select statement.
That seems to output the geometry column in a ‘Hex Encoded OGC Well Known Binary’ encoding. Using the GeometryReplacer I turned this back into a ~'fme geometry object’. If I then however filtered on the GeometryType, it shows up as a Polygon, where I knew in the PostGIS DB the standardized_location geometry column was defined with type ‘geometry(MultiPolygon, 4258)’.
I then used the ST_AsEWKT(), ST_AsGML() and ST_AsGeoJSON() functions to return the geometry from the database in some different encodings. If I use the GeoJSON or GML encoding in the GeometryReplacer, the geometry does still show up as a MultiPolygon feature. Also the EWKT encoding depicted the geometry as 'MultiPolygon’.
Furthermore, when I performed the same query as before, but now using the PostGIS reader (instead of the PostgreSQL reader) in the SQLExecutor, the 'fme geometry object’ that is created upon including the geometry column 'standardized_location’ in the select statement, also results in a MultiPolygon geometry.
That lead me wondering. Is ‘Hex Encoded OGC Well Known Binary’ encoding maybe not equipped to be able to distinguish between a Polygon geometry and a MultiPolygon geometry?
N.b. this behaviour is probably isolated to MultiPolygon geometries that have only a single part.
Curious if someone maybe knows a bit more on this.
Kind regards,
Thijs
For illustration to above description, see the screenshot below;