Select to view content in your preferred language

Generate geometry by expression tool similar to QGIS

415
6
07-25-2024 07:29 AM
ChristopherDawe
Regular Contributor

I am trying to find a method of generating geometry based off a single point feature and 4 of its attributes to create a crown spread based on distances in each of the 4 cardinal directions.

In QGIS there is a tool called "Geometry by Expression" where it is fairly simple to generate these points, buffer them and convex hull to generate a polygon of the coverage, however i cannot find any similar tools in ArcGIS Pro.

I understand this could probably be done using python, however my skills are limited with python scripting, and hoping there is an easier way. I would ultimately like to build this into model builder alongside some other processes

Any ideas would be greatly appreciated

6 Replies
jcarlson
MVP Esteemed Contributor

Ah, the QGIS geometry generator. It really spoils you for using other tools, that's for sure. You might be able to do this in Pro, yes. I don't have Pro open to test this, but here's my idea:

  1. Add 4 marker symbols to your symbology
  2. Enable attribute-based symbology connections
  3. Set the x/y offset of each based on the cardinal direction fields
  4. Add a global modifer to your symbology settings for a bounding polygon
  5. Set the global bounding polygon type to convex hull

I'm intrigued by this enough to boot into Windows, and will follow up with any results.

- Josh Carlson
Kendall County GIS
0 Kudos
jcarlson
MVP Esteemed Contributor

Bah! Looks like a no-go. The symbology panel keeps griping about inconsistent geometry logic and won't let me apply a bounding polygon to the layer. I can get the points to show up shifted in their cardinal directions, at least.

The closest I can get is to use the "circular sector" effect on 4 fill layers, then tie the cardinal directions to the radius value and set the angles appropriately. It doesn't look very good compared to what's possible elsewhere, though. Here it is, with different colors applied to make it easier to see the different sectors. Adding a negative buffer and positive offset helps make the wedges a bit smoother, but it's still a far cry from ideal.

jcarlson_1-1721922461238.png

 

 

- Josh Carlson
Kendall County GIS
0 Kudos
Bud
by
Esteemed Contributor

Would it be worth submitting an ArcGIS Pro idea for this? At the very least, an idea would get Esri to confirm the functionality doesn't already exist in Pro.

Bud
by
Esteemed Contributor

For our notes, here is your related idea: generate geometry from expression

0 Kudos
Bud
by
Esteemed Contributor
  1. Can you provide some sample data in an Excel export or in a mobile geodatabse export (you might need to zip the mobile geodatabase in order to attach it to your original post above).
  2. What kind of geodatabase? For example, Oracle 18c 10.7.1 enterprise geodatabase.
  3. What version of ArcGIS Pro?


For anyone using Oracle, this is what it might look like using SDO_GEOMETRY (untested):

sdo_geometry('polygon(('||x1||' '||y1||', '||x2||' '||y2||', '||x3||' '||y3||', '||x4||' '||(y4)||', '||x1||' '||y1||'))',26917) as shape

Source: https://community.esri.com/t5/arcgis-pro-questions/convert-grid-lines-to-polygons/m-p/1183793/highli....

I would think the same kind of thing could be done using SDE.ST_GEOMETRY SQL functions.

At least, that would generate the rectangle polygon. It doesn't help with the buffered points part.

https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/st-buffer.htm

https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/st-convexhull.htm

https://desktop.arcgis.com/en/arcmap/latest/manage-data/using-sql-with-gdbs/st-aggr-convexhull.htm 

0 Kudos
Bud
by
Esteemed Contributor

Have you tried using geoprocessing tools for this? Something like the following (untested):

  1. Export your hosted points layer to a geodatabase feature class.
  2. Create new fields: POINT_X and POINT_Y. Populate using Calculate Geometry.
  3. Create more new fields:
    1. NORTH_X and NORTH_Y
    2. EAST_X and EAST_Y
    3. SOUTH_X and SOUTH_Y
    4. WEST_X and WEST_Y
      Populate the new fields with mappable coordinates using Calculate Field. The math is up to you.
  4. Using a database view (or any other method, such as manually loading data into a newtable), unpivot the data so that you have a row for each cardinal direction vertex, producing a sort of vertical table. Fields: POINT_ID, X, Y.
  5. Use the XY Event Layer tool to generate a spatial point layer of the X and Y vertices.
  6. Buffer the points. Dissolve using the POINT_ID field.
  7. Use the Minimum Bounding Geometry tool to create convex hull polygons from your buffered multi-part/dissolved point polygons.

There are likely some details I've overlooked. But maybe the general idea is useful.


Edit:

Why do you want convex hulls? Why not a minimum bounding circle? A minimum bounding circle might eliminate the need for the buffered points step.

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/minimum-bounding-geometry.ht...

Bud_0-1724439351426.png

Or, better still, could you generate a circle using the longest cardinal direction measurement, using the point geometry as the middle of the circle? (Maybe using a simple technique like the Buffer tool.)
If not, can you show us a screenshot of your data, demonstrating why the technique you described is better? (buffering the cardinal directions points and then doing a convex hull to make a polygon from them)

0 Kudos