I'm not sure how you're creating your fgb's, but from an ogr2ogr context
try promoting all geoms to multi:
-nlt PROMOTE_TO_MULTI
On 6/21/23 07:50, Benedek Petrovicz wrote:
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
<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
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
MapServer-users mailing list
MapServer-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users