Detect arc in st_geometry

551
4
04-10-2017 01:43 AM
Highlighted
New Contributor

Hello,

I have two features class (multipolygon and multiline) with ST_GEOMETRY format in a 9.3 geodatabase.

How to detect features that contains arcs using sde ?

Tags (3)
Reply
0 Kudos
4 Replies
Highlighted
MVP Esteemed Contributor

I am not sure of an SQL-based approach, but you can use an ArcPy search cursor:

fc = # path to feature class
with arcpy.da.SearchCursor(fc, ["OID@","SHAPE@"]) as cur:
    for oid, shape in cur:
        if "curve" in shape.JSON:
            print oid
Highlighted
New Contributor

I'm under ArcGIS 9.3.1, so I tried using ArcgisScripting.

But Geometry object seems not to have ".JSON" property.

Reply
0 Kudos
Highlighted
MVP Esteemed Contributor

I didn't realize your client was also stuck back at 9.3.x.  Do you have access to a newer client that can connect to the 9.3 geodatabase?

If you have to stick with ArcGIS 9.3.1 as a client, I will have to think about options.  It may be you could use comtypes or a similar package to access ArcObjects directly from Python.

Reply
0 Kudos
Highlighted
New Contributor

OK, I will try using ArcObjects and ComTypes.

But how to test an ArcObject IGeometry (polyline or polygon) contains arcs ?

Reply
0 Kudos