zigGIS Bugs/Issues + Fixes

1 view
Skip to first unread message

Kezzer

unread,
Aug 6, 2010, 6:16:54 AM8/6/10
to zigGIS
Hi there,

As we've been working closely with zigGIS we've noticed a few
discrepancies that introduce performance problems, as well as a bug.
I've e-mailed Abram with no response as of yet. I tweeted that we
found a significant issue but we're unsure if it's there by design or
not.

*Issue 1: PostGisWorkspace optional parameter bug*

Extract from the e-mail I sent to Abram:

"I've attached a patch containing a bugfix for the optional parameter
in the semi-colon-separated argument for PostGisWorkspace. The
exception shown in the previous part explained how the coordinates
were optional, but the code didn't allow it to be an optional
parameter due to the following line that was outside of the previous
if statement:

dim = (CoordinateSystem)
Enum.Parse(typeof(CoordinateSystem), bits[4], true);

This line was always executed regardless of the argument count, so it
assumed a fifth parameter was always available causing issues."

*Issue 2: Case-sensitive geometry types*

Extract from the e-mail I sent to Abram:

Further to my last e-mail, another issue is indirectly shown in that
passing a geometry type through OpenFeatureClass will be useless if
it's in lower-case and your collation is set up to be case sensitive.
There's one of two ways of solving this problem; either force the
geometry type to be in upper-case (which I recommend against) or
document it a bit more clearly. I can understand this was an
oversight as it was probably tested against upper-case strings all the
time.

For example, here's an extract from a query generated by zigGIS:

SELECT
ST_AsEWKB(transform(the_geom,102070)) AS the_geom,
gid
FROM
"Building_Polygons"
WHERE
GeometryType(the_geom)='multipolygon'
AND ST_GeomFromEWKT('SRID=4306;POLYGON((32291.0690399444
44267.4581796576,36844.7440405659 44267.4581796576,36844.7440405659
47728.8337398316,32291.0690399444 47728.8337398316,32291.0690399444
44267.4581796576,32291.0690399444 44267.4581796576))')&&the_geom
AND intersects(ST_GeomFromEWKT('SRID=4306;POLYGON((32291.0690399444
44267.4581796576,36844.7440405659 44267.4581796576,36844.7440405659
47728.8337398316,32291.0690399444 47728.8337398316,32291.0690399444
44267.4581796576,32291.0690399444 44267.4581796576))'),the_geom)=true

This will not work because of GeometryType(the_geom)='multipolygon'
most probably due to my collation. Instead it must be
GeometryType(the_geom)='MULTIPOLYGON'.

I wouldn't recommend changing the code, just ensure there's some
documentation. You could throw an InvalidGeometryTypeException if you
were feeling really adventurous.

*Issue 3: PostGisSelectionSet serious performance issue*

This - in my opinion - is a lot more serious and should have a hotfix
issued. I am also thinking that there must be a reason for this
problem. If you've got a layer, say with 80,000 polygons (which isn't
many) and you zoom very close in to somewhere that only shows say 30
polygons, and then select one of those polygons, zigGIS will actually
go ahead and re-load ALL polygons. I've got a patch that I shall e-
mail to in...@obtusesoft.com

This is specifically when using the edit tool to select a polygon on
the screen, and I think it happens in other cases as well. We tracked
this issue down to Search(IQueryFilter, bool, out ICursor) in
PostGisSelectionSet and noticed that the where clause contained
nothing, thus was never filtering out the specific "gid" (this is
specific to our environment, but may be the same in others). There
were a few approaches to fixing this, but we thought manually
specifying the conditions in the clause dependent on the contents of
the Oids variable made more sense.

I'll send both patches to in...@obtusesoft.com now.

Many thanks.

xanadont

unread,
Aug 9, 2010, 1:09:55 PM8/9/10
to zigGIS
Kieren,

We don't officially support zigGIS as an API so the way with which
zigGIS hooks into ArcGIS is more or less proprietary (bugs included).
We're not really entertaining patches at this point since zigGIS 2.x
is at end-of-life. With that said, however, we do appreciate the
input and I personally will look into incorporating your performance
tweak; indeed the slowness of selections has been a sore point for a
while.

-Abe
> mail to i...@obtusesoft.com
>
> This is specifically when using the edit tool to select a polygon on
> the screen, and I think it happens in other cases as well.  We tracked
> this issue down to Search(IQueryFilter, bool, out ICursor) in
> PostGisSelectionSet and noticed that the where clause contained
> nothing, thus was never filtering out the specific "gid" (this is
> specific to our environment, but may be the same in others).  There
> were a few approaches to fixing this, but we thought manually
> specifying the conditions in the clause dependent on the contents of
> the Oids variable made more sense.
>
> I'll send both patches to i...@obtusesoft.com now.
>
> Many thanks.
Reply all
Reply to author
Forward
0 new messages