Select to view content in your preferred language

Check $feature geometry type

850
3
Jump to solution
08-10-2023 12:25 PM
Jake_S
by Esri Contributor
Esri Contributor

I have code that reused on different feature classes that does a basic intersects functionality to retrieve field values and insert into the $feature. Yet the code should by pass some functions if $feature is a point feature class verses $feature being a polygon feature. Is this possible?

if (Geometry($feature)== "point"){
# do this
}
if (Geometry($feature)== "polygon"){
# do that
}


Something to that effect.

Thanks in advance

~JS

0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Notable Contributor

Haven't tried it, but I think you could use Geometry type for that.

RhettZufelt_0-1691696580907.png

R_

View solution in original post

3 Replies
RhettZufelt
MVP Notable Contributor

Haven't tried it, but I think you could use Geometry type for that.

RhettZufelt_0-1691696580907.png

R_

Jake_S
by Esri Contributor
Esri Contributor

Brilliant @RhettZufelt 

0 Kudos
ChristophKoschmieder
Regular Contributor

You could also use

Lower(Geometry($feature).type)

For me the surrounding "Lower()" was needed in order to get lower case results (e.g. "polygon").

For more information about the "Geometry" object and its properties:

Data Types | ArcGIS Arcade | ArcGIS Developers

0 Kudos