[postgis-users] dont_force() and "best_type"
Dave Blasby
dblasby at refractions.net
Mon Jun 24 09:34:57 PDT 2002
> By patching the "best_type != MS_SHAPE_NULL" to be "best_type == MS_SHAPE_NULL"
> I was able to get things working, otherwise with only point geometries the
> best_type remained MS_SHAPE_NULL.
>
> Should I apply this patch? I don't entirely understand what this function
> is trying to accomplish.
I took this function from another mapserver pluging connector. To tell
you the truth, I'm not 100% sure whats supposed to happen with a
MS_ANNOTATION layer, so I'm not surprised I didnt do it correctly.
The function's supposed to look at the object (a single geometry) and
find out what its "best" geometry type is. For annotations, polygon is
best, followed by a line, followed by a point. Since postgis geometries
can be hetrogeneous, but mapserver is homogeneous, I convert the postgis
geometry into a homogeneous geometry. This means a geometry with a
point, line and polygon will end up with just a polygon, and so on. The
force_* functions do the hetrogenous-to-homogeneous conversion.
You are correct, that should be a "==" not a "!=". Please apply the
patch.
dave
More information about the postgis-users
mailing list