Terraserver and the demo WMSClient

Aug 3, 2007 at 3:24 PM
Hey there;

I have been tinkering in an effort to expand my knowledge of sharpmap capabilities and usage. I have been exploring the demo WMS client and have been able to modify it to get data from a couple of other servers. The only change that I made was to change the URL in the call to LoadWms. For example -

LoadWms("http://clearinghouse1.fgdc.gov/scripts/ogc/ms.pl");

gets me some interesting data. I would like to access Microsoft's terraServer but unfortunately, the demo tosses errors when I use

http://terraserver.microsoft.com/ogccapabilities.ashx

as the URL in the call to LoadWms. If I use

http://terraserver.microsoft.com/OgcWms.aspx

I get an error that the capabilities could not be gotten.

Anyone have any pointers on how to go about getting tile data from terraServer?

Bill
Aug 8, 2007 at 4:39 PM
This is something I have also been trying to figure out
Developer
Aug 10, 2007 at 2:57 PM

This works in my test:
LoadWms("http://terraserver.microsoft.com/ogccapabilities.ashx");

Which error do you get?

Paul.
Aug 10, 2007 at 6:38 PM
Thanks much! That got me somewhere. In the wmsClient demo, using that URL in the LoadWMS, I am getting the layers returned. I am still not getting any imagery but I think that may be due to the way the demo is setup and the availability of tiles at certain levels of zoom. I am going to see about putting some hard-coded test features into my little UI over the weekend.

I have no idea what I was doing wrong the first time but if I copy your URL in, it works!

Bill

p.s. Have a great weekend.
Aug 10, 2007 at 9:02 PM
I had to share!

SharpMap.Layers.WmsLayer picLayer = new WmsLayer("PicLayer", "http://terraserver.microsoft.com/ogccapabilities.ashx");
picLayer.SetImageFormat(picLayer.OutputFormats0);
picLayer.SpatialReferenceSystem = "EPSG:4326";
picLayer.RemoveAllLayers();
picLayer.AddLayer("DOQ");

mapNetView.Map.Layers.Add(picLayer);


I put these few little statements above the part of my code where I create the vessel movement network and BAM! I have fantastic foundation imagery that just kicks this up.

Should we ever meet - the first and second rounds are on me!

Bill