Select to view content in your preferred language

Publish web service based on spatial query

310
2
01-10-2024 09:30 AM
Labels (1)
LaurenCammack01
Occasional Contributor

Our city has a tree inventory that includes trees in our community orchards. I would like to filter the entire tree inventory layer based on trees within parcel boundaries (orchard areas). Some trees are retired/added throughout the year so I would like it to automatically update the orchard trees in those boundaries. Is there a way to essentially do a def query but spatially?

This layer will then be published as a web service to be added to an experience builder. 

0 Kudos
2 Replies
ZachBodenner
MVP Regular Contributor

Do you have control over the schema of the tree inventory? I think the easiest solution would be to use an attribute as the definition query, either a dedicated attribute or else something else that can work as a stand-in for whether they're in an orchard or not. Looking all the way back to this idea from 2010, it looks like there is not spatial query, at least that's built into ESRI software natively.

0 Kudos
Bud
by
Esteemed Contributor
  1. What kind of enterprise geodatabase? Oracle, SQL Server, PostgreSQL?
  2. Are you sure you want to do a spatial definition query (re-run the query every time a user views it in the map)? It can be done with spatial functions, but they're slow.
  3. Can you give us an idea of your level of expertise with advanced SQL queries, spatial indexes, etc? Spatial SQL queries can be tricky.
    1. Do you use a SQL client like Toad or SQL Developer?
  4. Have you considered pre-computing using a scheduled geoprocessing tool, attribute rules, etc?
  5. How many features are there in the trees and parcel feature classes?
  6. What version of ArcGIS Pro and Enterprise?
  7. What spatial type is used? ESRI’s ST_Geometry? PostgreSQL’s native spatial type?

Related:

0 Kudos