Hi Gareth Jayne,
I understand you're looking for an alternative to the Azure Maps Spatial/pointInPolygon endpoint, which has now been deprecated. This endpoint previously enabled you to determine whether a set of coordinates falls within a predefined polygon capability your Power Automate flow relies on. Unfortunately, as of now, there is no direct replacement for this functionality in the current Azure Maps REST API documentation.
Using Azure Maps Get Polygon API (with Custom Logic)
One possible workaround is to use the Azure Maps Get Polygon API, which allows you to retrieve polygon geometry data for a given region. While this API doesn't perform point-in-polygon checks directly, you could extract the polygon coordinates and implement your own spatial logic either within an Azure Function, a custom connector, or an external service to determine whether a given point lies inside the polygon.
Using Azure SQL or Cosmos DB for Spatial Queries
Another robust approach is to utilize spatial capabilities offered by Azure SQL Database or Azure Cosmos DB. Both platforms support geospatial data types and queries, making them suitable for your use case.
- Azure SQL Database allows the use of methods such as
STWithin()orSTIntersects()to determine whether a point lies inside a stored polygon. - Azure Cosmos DB supports GeoJSON format and similar spatial queries like
ST_WITHIN, enabling efficient geographic computations in a NoSQL environment.
The best solution depends on your architecture and how adaptable your Power Automate flow is. If you prefer to remain within the Azure Maps ecosystem, the Get Polygon + custom logic approach might work. if you're open to integrating a database or external service, Azure SQL or Cosmos DB provide more scalable and built-in geospatial functionality.
References:
https://free.blessedness.top/en-us/azure/cosmos-db/nosql/query/geospatial?tabs=javascript
if this answers your query, please do click Accept Answer and Yes for was this answer helpful.
Thank you!