Get a FGDB FC point's XY coordinates using SQL

113
3
12-05-2022 06:58 PM
Status: Needs Clarification
Labels (1)
Bud
by
Regular Contributor III

In an SQL Expression or a database view on a file geodatabase:

If I understand correctly, we can't access the XY coordinates of a point feature using SQL.

For example, something like this:

x_coord(shape) --would resolve to 665,478.140 meters


Could that functionality be added as a function in the FGDB engine/SQL syntax?

I'm aware that a workaround would be to store the X and Y coordinates in static fields in the FC via a calculation attribute rule. But it would be a lot of work to implement that for all FCs in all FGDBs. Doing it in SQL would be better.

Thanks.

3 Comments
Bud
by

It might be possible to query for this kind of thing using open source tools like GDBee and QGIS. The FGDB SQL querying functionality seems pretty comprehensive: https://github.com/AlexArcPy/GDBee

KoryKramer

Hi @Bud what is your workflow? i.e. what are you trying to do with the x, y coordinates once extracted from the shape? Because this can be done using Arcade...

SSWoodward
Status changed to: Needs Clarification