Does the WMS Server Edition support serving GDAL raster types such as MrSID, NITF, and DTED? We have been using GeoServer but some of the bugs in it have caused a lot of problems and we are open to writing our own implementation if we are able to server the same imagery types we currently server from GeoServer (GDAL types being our primary format). Please advise.
Supported Imagery Types
Hi Ben,
The WMS Server Edition support serving MrSID(MrsidRasterLayer), NITF and DTED(GdalRasterLayer), I think you will implement a wms customize plugin as the “ChangeStyleByUserWmsLayerPlugin”, you can create a class which is inherited on WmsLayerPlugin, then override requirement methods as the attachment sample:
public class ChangeStyleByUserWmsLayerPlugin : WmsLayerPlugin
{
protected override MapConfiguration GetMapConfigurationCore(string style, string crs)
{
string worldLayerFilePath = Directory.GetParent(Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).FullName).FullName + Path.DirectorySeparatorChar + "SampleData" + Path.DirectorySeparatorChar + "Countries02.shp";
MrsidRasterLayer worldLayer = new MrsidRasterLayer(worldLayerFilePath);
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
MapConfiguration mapConfiguration = new MapConfiguration();
mapConfiguration.Layers.Add("WorldLayer", worldLayer);
return mapConfiguration;
}
protected override Bitmap GetMapCore(GetMapRequest getMapRequest, MapConfiguration mapConfiguration, System.Web.HttpContext context)
{
MrsidRasterLayer layer = mapConfiguration.Layers["WorldLayer"] as MrsidRasterLayer;
NameValueCollection queryString = context.Request.QueryString;
string userName = queryString["UserName"];
// Based on the user we are going to apply a different style on the fly
switch (userName)
{
case "User1":
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
break;
case "User2":
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Black;
break;
case "User3":
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.StandardColors.Wheat;
break;
default:
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.NoData1;
break;
}
return base.GetMapCore(getMapRequest, mapConfiguration, context);
}
protected override string GetNameCore()
{
return "Change Style By User";
}
protected override Collection<string> GetProjectionsCore()
{
return new Collection<string> { "EPSG:4326" };
}
protected override RectangleShape GetBoundingBoxCore(string crs)
{
return new RectangleShape(-126.826171875, 57.104766845702, -70.83984375, 18.960235595702);
}
}
Thanks
Don