/// <summary>
 /// Convert bounding box from one coordinate system to
 /// another coordinate system.
 /// Converted bounding box is returned as a polygon
 /// since it probably is not a rectangle any more.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="boundingBox">Bounding boxe that should be converted.</param>
 /// <param name="fromCoordinateSystem">From coordinate system.</param>
 /// <param name="toCoordinateSystem">To coordinate system.</param>
 /// <returns>Converted bounding box.</returns>
 public WebPolygon GetConvertedBoundingBox(
     WebClientInformation clientInformation,
     WebBoundingBox boundingBox,
     WebCoordinateSystem fromCoordinateSystem,
     WebCoordinateSystem toCoordinateSystem)
 {
     using (WebServiceContext context = GetWebServiceContext(clientInformation))
     {
         try
         {
             return(WebServiceData.CoordinateConversionManager.GetConvertedBoundingBox(
                        boundingBox,
                        fromCoordinateSystem,
                        toCoordinateSystem));
         }
         catch (Exception exception)
         {
             LogException(clientInformation, context, exception);
             LogParameter(context, "BoundingBox", boundingBox.WebToString());
             LogParameter(context, "FromCoordinateSystem", fromCoordinateSystem.WebToString());
             LogParameter(context, "ToCoordinateSystem", toCoordinateSystem.WebToString());
             throw;
         }
     }
 }
 /// <summary>
 /// Geographic coordinate conversion of polygons.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="polygons">Polygons that should be converted.</param>
 /// <param name="fromCoordinateSystem">From coordinate system.</param>
 /// <param name="toCoordinateSystem">To coordinate system.</param>
 /// <returns>Converted points.</returns>
 public List <WebPolygon> GetConvertedPolygons(
     WebClientInformation clientInformation,
     List <WebPolygon> polygons,
     WebCoordinateSystem fromCoordinateSystem,
     WebCoordinateSystem toCoordinateSystem)
 {
     using (WebServiceContext context = GetWebServiceContext(clientInformation))
     {
         try
         {
             return(WebServiceData.CoordinateConversionManager.GetConvertedPolygons(
                        polygons,
                        fromCoordinateSystem,
                        toCoordinateSystem));
         }
         catch (Exception exception)
         {
             LogException(clientInformation, context, exception);
             LogParameter(context, "Polygons", polygons.WebToString());
             LogParameter(context, "FromCoordinateSystem", fromCoordinateSystem.WebToString());
             LogParameter(context, "ToCoordinateSystem", toCoordinateSystem.WebToString());
             throw;
         }
     }
 }
 /// <summary>
 /// Get cities with names matching the search criteria
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="searchCriteria">City name search criteria</param>
 /// <param name="coordinateSystem">Coordinate system used in returned geography information.</param>
 /// <returns></returns>
 public List <WebCityInformation> GetCitiesByNameSearchString(
     WebClientInformation clientInformation,
     WebStringSearchCriteria searchCriteria,
     WebCoordinateSystem coordinateSystem)
 {
     using (WebServiceContext context = GetWebServiceContext(clientInformation))
     {
         try
         {
             return
                 (ArtDatabanken.WebService.GeoReferenceService.Data.RegionManager.GetCitiesByNameSearchString(
                      context,
                      searchCriteria,
                      coordinateSystem));
         }
         catch (Exception exception)
         {
             LogException(clientInformation, context, exception);
             LogParameter(context, "CoordinateSystem", coordinateSystem.WebToString());
             LogParameter(context, "SearchCriteria", searchCriteria.WebToString());
             throw;
         }
     }
 }
 /// <summary>
 /// Get geography for regions.
 /// </summary>
 /// <param name="clientInformation">Information about the client that makes this web service call.</param>
 /// <param name="regionIds">Region ids.</param>
 /// <param name="coordinateSystem">Coordinate system used in returned geography information.</param>
 /// <returns>Geography for regions.</returns>
 public List <WebRegionGeography> GetRegionsGeographyByIds(
     WebClientInformation clientInformation,
     List <Int32> regionIds,
     WebCoordinateSystem coordinateSystem)
 {
     using (WebServiceContext context = GetWebServiceContext(clientInformation))
     {
         try
         {
             return
                 (ArtDatabanken.WebService.GeoReferenceService.Data.RegionManager.GetRegionsGeographyByIds(
                      context,
                      regionIds,
                      coordinateSystem));
         }
         catch (Exception exception)
         {
             LogException(clientInformation, context, exception);
             LogParameter(context, "RegionIds", regionIds.WebToString());
             LogParameter(context, "CoordinateSystem", coordinateSystem.WebToString());
             throw;
         }
     }
 }