This is a migrated thread and some comments may be shown as answers.

Retrieve Points inside a Map Polygon Telerik

1 Answer 84 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Luis
Top achievements
Rank 2
Luis asked on 27 Apr 2017, 09:29 PM
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);

1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 02 May 2017, 08:01 AM
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.
Tags
General Discussions
Asked by
Luis
Top achievements
Rank 2
Answers by
Petar Mladenov
Telerik team
Share this question
or