Problem determing proper geometry type with ArcSDE 9.x
------------------------------------------------------

                 Key: GEOT-899
                 URL: http://jira.codehaus.org/browse/GEOT-899
             Project: GeoTools
          Issue Type: Bug
          Components: data arcsde
    Affects Versions: 2.2-RC3
         Environment: ArcSDE 9.0 and 9.1
            Reporter: Richard Gould
         Assigned To: Gabriel Roldán
             Fix For: 2.2
         Attachments: arcsde.patch

In ArcSDE 9.x, the constants in "SeLayer" seem to have changed. This can cause 
ArcSDEAdapter.getGeometryType() to return an incorrect geometry.

it seems that there are two ways to determine a layer's geometry type:

1) Check its type against the TYPE_* constants, and
2) If that fails, check the type against the various SE_*_TYPE_MASK constants

The problem in this instance is that the SeLayer's geometry type is "2", which 
corresponds to both TYPE_LINE and SE_POINT_TYPE_MASK. The layer's true geometry 
is Point, but since it matches against TYPE_LINE in case 1, the wrong geometry 
type is returned.

With my limited understanding of ArcSDE and the java API it uses, I propose a 
method to hopefully fix this:
1) Check if the major version of the instance is 9 or higher. If it isn't, 
proceed exactly as before.
2) If the major version is 9 or higher, do not perform case 1 above. (ie do not 
check the type value against the TYPE_* constants)

Attached is a patch that makes these adjustments to ArcSDEAdapter on 2.2.x.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to