[MapServer-users] FlatGeobuf as output format

Benedek Petrovicz benedek.petrovicz at gmail.com
Wed Jun 21 07:50:12 PDT 2023


Hi!

I'm trying to integrate OGR's FlatGeobuf driver as an output format in my
mapfiles.
It works for the most part and it's awesome, but it fails immediately when
I feed some MultiPolygons into it.

The geometries are queried from an MSSQL DB.

I get the following error:
msOGRWriteShape(): OGR error. Attempt to write feature failed (code=6):
ICreateFeature: Mismatched geometry type msCalculateScale(): General error
message. Invalid image width or height.

I found a little note in the docs which corresponds with this issue (
https://mapserver.org/input/vector/ogr.html):
*"Even though MapInfo and other OGR data sources may support layers with
mixed geometry types (e.g. points, lines and polygons in the same file)
this is not yet supported in MapServer. So you still have to define a layer
‘TYPE’ and make sure that all the shapes in the OGR data source are
compatible with that layer type, otherwise MapServer may produce an error
about incompatible geometry types at runtime."*

So it fails for me when I have Polygons and MultiPolygons in the table I'm
querying.
But it also fails if it includes MultiPolygons only. So with no mixing of
types.

I'm using the POLYGON type for my layer in the mapfile.

The same dataset works fine when I'm using the GML2 output format. Even
with mixing Polygons and MultiPolygons.

Am I doing something wrong here?
Is it a known limitation for MultiPolygons?
Is there a way to bypass the issue while retaining the geometries in the DB?

Thank you
Petrovicz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230621/59fd44fc/attachment.htm>


More information about the MapServer-users mailing list