Retrieve Points inside a Map Polygon Telerik

2 posts, 0 answers
  1. Luis
    Luis avatar
    3 posts
    Member since:
    Jan 2017

    Posted 27 Apr Link to this post

    Hello guys,

    I'm trying to get the points inside a polygon with an spatial query, the thing is that the points and the polygon are in the same SQL Table, I'm attaching a picture with the result of a Select Query (image attached) where you can see that the last 3 records are the polygons that contains points.

    I've tried this with one point but it won't work because I need a list with the names of the polygons and the points inside of it in a spatial query.

            DECLARE @POI geography;  
            DECLARE @POLYGON geography;  
            SET @POI = (SELECT TOP 1 GEO FROM POI WHERE LAYERID <> 1026);
            SET @POLYGON = (SELECT TOP 1 GEO FROM POI WHERE LAYERID = 1026);
            SELECT @POLYGON.STContains(@POI);
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2980 posts

    Posted 02 May Link to this post

    Hello Luis,

    We believe this is a general question related to your specific DB schema and SQL know-how and not related to our UI for WPF. That's why we encourage you to post this question to other channels, for example stackoverflow.

    Regards,
    Petar Mladenov
    Telerik by Progress
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top