arcgis.geometry module translate() method returns None for arcs/curved polygons

233
1
09-22-2022 10:22 AM
TylerT
by
Occasional Contributor III

Greetings,

I have encountered a case where the arcgis.geometry module translate() method returns None rather than performing a translate.  This case occurs when the geometry has arcs or curves and is described with 'curvedrings' vice 'rings'.  Have others experienced this and/or determined any valid work arounds? 

TylerT_0-1663866736805.png

Thank you,

Tyler

0 Kudos
1 Reply
TylerT
by
Occasional Contributor III

Following up with an example screen shot and example code...

TylerT_0-1663967699620.png

from arcgis import geometry

pgon1 = geometry.Geometry({"rings": [[[1275.5835581005285, 597.3732359542939], 
                                      [1275.5835581005285, 557.3732359542939], 
                                      [1195.5835581005285, 557.3732359542939], 
                                      [1195.5835581005285, 597.3732359542939], 
                                      [1275.5835581005285, 597.3732359542939]]], 
                           "spatialReference": {"wkid": None}})

pgon2= geometry.Geometry({"curveRings": [[[1275.5835581005285, 517.2014099403175], 
                                          [1275.5835581005285, 507.2014099403175], 
                                          [1195.5835581005285, 507.2014099403175], 
                                          [1195.5835581005285, 547.2014099403175], 
                                          [1245.5835581005285, 547.2014099403175], 
                                          {"c": [[1275.5835581005285, 517.2014099403175], 
                                                 [1266.796761536125, 538.4146133759139]]}]], 
                          "spatialReference": {"wkid": None}})

display(pgon1)
display(pgon2)

pgon1.translate(28, -7, inplace=True)
display(pgon1)
display(pgon1.coordinates)

pgon2.translate(28, -7, inplace=True)
display(pgon2)
display(pgon2.coordinates)

 

pgon2.translate(28, -7) is returning a NoneType object.  The curve seems to be throwing off the translate.

0 Kudos