Detect arc in st_geometry

1012
4
04-10-2017 01:43 AM
LOU_Sud-OuestThales_Services
New Contributor II

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)
0 Kudos
4 Replies
JoshuaBixby
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
LOU_Sud-OuestThales_Services
New Contributor II

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

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

0 Kudos
JoshuaBixby
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.

0 Kudos
LOU_Sud-OuestThales_Services
New Contributor II

OK, I will try using ArcObjects and ComTypes.

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

0 Kudos