I've used OSM2MSSQL to fill db with 2 cities streets. Now I have the following tables in my DB :
tNode tNodeTag tRelation tRelationMember tRelationTag tTagText tWay tWayCreation tWayTag
How can I get all the streets that are in a specific city ?
As bhell suggested I did the following query to get the streets in a specific city:
Using SQL Query
DECLARE @POI geography;
SET @POI = geography::STGeomFromText('POINT(36.81120 -1.27531)', 4326);
DECLARE @BOUNDS geography;
SET @BOUNDS = geography::STGeomFromText('POLYGON((36.68936531 -1.354740152,36.93951706 -1.354740152,36.93951706 -1.196323211,36.68936531 -1.196323211,36.68936531 -1.354740152))', 4326)
FROM [TABLE_STREETS] as a
WHERE @BOUNDS.STContains(a.geom) = 1
Thank you for your help.