Thursday, 24 January 2008

Spatial queries: not just for Earth

No idea what real applications this might have, but it was kinda fun:
/* http://www.fi.edu/pieces/schutte/landchart.html */
select -- Apollo landings
geography::STGeomFromText('POINT(0.67 23.49)', 4326)--1
, geography::STGeomFromText('POINT(-2.94 -23.45)', 4326)--2
, geography::STGeomFromText('POINT(-3.67 -17.46)', 4326)--14
, geography::STGeomFromText('POINT(26.11 3.66)', 4326)--15
, geography::STGeomFromText('POINT(-8.6 15.31)', 4326)--16
, geography::STGeomFromText('POINT(20.17 30.8)', 4326)--17
, 15.0 AS [Thickness], '#770000ff' AS [Color]



The map data in Geoquery is in a configurable Xml file - MapSources.xml so it's relatively simple to include different tile servers for Earth images (as well as the Moon & Mars)!

2 comments:

  1. I don't think you should be using 4326 for the moon :-)
    I wonder if we have a datum that fits the size of the moon...

    ReplyDelete
  2. Good point - I didn't see an SRID that was appropriate, although I found this on the web...

    GEOGCS["GCS_Moon_2000",
    DATUM["D_Moon_2000",
    SPHEROID["Moon_2000_IAU_IAG",1737400.0,0.0]],
    PRIMEM["Reference_Meridian",0.0],
    UNIT["Degree",0.0174532925199433]]

    Now there's just the small problem of getting it into sys.spatial_reference_systems :)

    ReplyDelete