Thursday, May 13, 2010

Map Reports...

I have been working on report builder 3.0 and trying to understand and build out map based reports. Usually i have using the sahpe file option or use the USA maps given in the map wizard to build out sample reports. One of the other option available is to build a spatial query. This is done by running a query against a table that has spatial data types defined, in my case I had a table with a location column and another geographytype column, this column had the LINESTRING between 2 points. When i built out the query

SET @GeoLocation = GEOGRAPHY::STPointFromText('POINT(-80.7941 35.3189)',4326)
SELECT NAME,Distance,Location
(select Name,(Bank.STDistance(@GeoLocation)/1000.00)* 0.62 AS Distance,Location
from venue) AS a
WHERE Distance <= 20
and executed i got back the results. In the results i had data like LINESTRING(-80.88 35.0228, -80.7941 35.3189), since there was LINESTRING data, the report builder prompted me 2 different kind of line maps. The first one was like a regular line based map, the other one was to display analytical data. To make these maps more meaningful, it would be good to add a tile layer using Bing maps. This way the line maps would make more sense visually. Here is the image without the bing maps background:

No comments:

Post a Comment