Complete Set of Geography for testing RRS feed

  • Question

  • I'm doing some rendering of SQL2008 geographies in Silverlight and need a complete set of tests. I havn't had much luck so it looks like I'll have to put these together myself, can you add to the list if you think I'm missing anything?

    1) Point
    2) MultiPoint
    3) LineString
    4) MultiLineString (variations of 1,2,3...10 lines)
    5) Polygon
    6) MultiPolygon (variations of 1,2,3...10 polys)
    7) Polygon with an interior hole (variations of 1,2,3...10 holes)
    8) GeometryCollection with everything below

    Are there any special cases for points or linestrings I need to test for? LineStrings can't cross over themselves can they?

    Windows Live Developer MVP - www.soulsolutions.com.au - follow http://twitter.com/bingmapsdev for latest news.
    Thursday, July 23, 2009 10:10 PM

All replies

  • Hi John,

    Some things to think about:

    - Linestrings can be simple (i.e. do not cross themselves) or not simple (where the path drawn between the points does cross itself). However, the linestrings that form the exterior and interior rings of a polygon must always be simple.
    - Linestrings can also be closed (end at the same point they began) or not closed (start and end are different). Note that a closed linestring is not the same as polygon - it may represent the exterior ring of a polygon but does not include the area contained within the ring.
    - You can have empty geometries of any type, that contain no points. Empty geometries may result from e.g. the result of the STIntersection() between two geometries that have no points in common.
    - You will probably want to test linestrings and polygons that cross over the 180th meridian as well as over the poles (i.e. they extend over the horizontal and vertical 'edges' of the map). How do you want to display such shapes on the map?
    - Many web-mapping providers such as Bing/Google Earth only plot data between latitude -85 and +85 rather than extending right to the poles. What happens when you plot a point on the North/South pole itself?
    - Do you want to test both the geometry and geography datatype? Using only SRID 4326?
    Beginning Spatial with SQL Server http://www.apress.com/book/view/1430218290
    Thursday, July 23, 2009 10:41 PM

  • What projection are you using to display geographies?

    You would probably need do clip the data, so generate some cases around the clipping areas.

    - If you are displaying multiple objects, watch out for different SRIDs.
    - GeometryCollections can have 28 levels (GeometryCollection(GeometryCollection(...)).
    - For geography type: latitude can go from -90 to 90, and longitude can go from ~ -15000 to ~ 15000. So cases like LINESTRING(0 0, 15000 0) might be interesting.
    Monday, July 27, 2009 9:05 AM