WMS Layers

Apr 9, 2014 at 3:08 PM
I would like to suggest adding a line of code to the Service class in brutile wms. There are certain wms services, such as the NRCS soils wms that are not recognized because the the SeviceName is not strictly "WMS". Either add every WMS server name to the ServerName class or do what I did, such as add this line of code "if (value.Contains("WMS")) value = "WMS";" in the services class to work around this:

if (ParseName)
        {
            element = node.Element(XName.Get("Name", @namespace));
            if (element == null)
                throw WmsParsingException.ElementNotFound("Name");
            var value = element.Value;
            if (value.StartsWith("OGC:")) value = value.Substring(4);
            if (value.Contains("WMS")) value = "WMS";
            try
            {
                Name = (ServiceName) Enum.Parse(typeof (ServiceName), value, true);
            }
            catch (System.Exception exception)
            {
                throw new WmsParsingException(String.Format("Invalid service name: {0}. Must be WMS", value),
                                              exception);
            }
Coordinator
Apr 9, 2014 at 6:03 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Apr 10, 2014 at 8:33 AM
Thanks for reporting. Do you have the url to the capabilities?
Apr 10, 2014 at 1:52 PM
Here is the wms url:

http://SDMDataAccess.nrcs.usda.gov/Spatial/SDM.wms

And to the capabilities:

http://SDMDataAccess.nrcs.usda.gov/Spatial/SDM.wms?&Request=GetCapabilities


On 4/10/2014 2:33 AM, pauldendulk wrote:

From: pauldendulk

Thanks for reporting. Do you have the url to the capabilities?