Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to standardize the internal naming conventions for plugins and keep the default plugins separate from the experimental plugins to make it easier for future explorers of this code to understand it.
- Loading branch information
Showing
2,464 changed files
with
173,106 additions
and
173,214 deletions.
There are no files selected for viewing
Empty file.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
60 changes: 30 additions & 30 deletions
60
...l.Plugins.FacetedSearch/FacetedSearch.sln → ...l/Plugins.FacetedSearch/FacetedSearch.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FacetedSearch3", "FacetedSearch3\FacetedSearch3.csproj", "{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|Mixed Platforms = Debug|Mixed Platforms | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|Mixed Platforms = Release|Mixed Platforms | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Mixed Platforms.Build.0 = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|x86.ActiveCfg = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FacetedSearch3", "FacetedSearch3\FacetedSearch3.csproj", "{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Debug|Mixed Platforms = Debug|Mixed Platforms | ||
Debug|x86 = Debug|x86 | ||
Release|Any CPU = Release|Any CPU | ||
Release|Mixed Platforms = Release|Mixed Platforms | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|Mixed Platforms.Build.0 = Release|Any CPU | ||
{BA38E49F-BB13-4AA3-A31F-69E16D7AA4A4}.Release|x86.ActiveCfg = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
242 changes: 121 additions & 121 deletions
242
...edSearch/FacetedSearch/Area/AreaHelper.cs → ...edSearch/FacetedSearch/Area/AreaHelper.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,121 +1,121 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using DotSpatial.Controls; | ||
using DotSpatial.Data; | ||
using DotSpatial.Projections; | ||
using FacetedSearch3.Area; | ||
using FacetedSearch3.Properties; | ||
|
||
namespace FacetedSearch3.Area | ||
{ | ||
static class AreaHelper | ||
{ | ||
#region Fields | ||
|
||
private static readonly ProjectionInfo _wgs84Projection = ProjectionInfo.FromEsriString(Resources.wgs_84_esri_string); | ||
|
||
#endregion | ||
|
||
#region Public methods | ||
|
||
public static IEnumerable<IMapPolygonLayer> GetAllPolygonLayers(Map map) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
return map.GetAllLayers().OfType<IMapPolygonLayer>(); | ||
} | ||
|
||
public static IEnumerable<IMapPolygonLayer> GetAllSelectedPolygonLayers(Map map) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
return GetAllPolygonLayers(map) | ||
.Where(subLayer => subLayer.IsVisible && | ||
subLayer.IsSelected); | ||
} | ||
|
||
public static void SelectFirstVisiblePolygonLayer(Map map, bool isWorldTemplate) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
//special case: world project template | ||
if (isWorldTemplate) | ||
{ | ||
map.MapFrame.IsSelected = false; | ||
foreach (var layer in GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible)) | ||
{ | ||
layer.IsSelected = true; | ||
map.Legend.RefreshNodes(); | ||
break; | ||
} | ||
} | ||
|
||
if (map.MapFrame.IsSelected) return; //don't select layers if map frame is already selected | ||
|
||
var hasSelected = GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible) | ||
.Any(item => item.IsSelected); | ||
if (hasSelected) | ||
return; | ||
|
||
foreach (var layer in GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible).Reverse<IMapPolygonLayer>()) | ||
{ | ||
layer.IsSelected = true; | ||
map.Legend.RefreshNodes(); | ||
break; | ||
} | ||
} | ||
|
||
public static Box ReprojectBoxToWGS84(Box sourceBox, ProjectionInfo sourceProjection) | ||
{ | ||
if (sourceBox == null) throw new ArgumentNullException("sourceBox"); | ||
if (sourceProjection == null) throw new ArgumentNullException("sourceProjection"); | ||
|
||
var xMin = sourceBox.XMin; | ||
var yMin = sourceBox.YMin; | ||
var xMax = sourceBox.XMax; | ||
var yMax = sourceBox.YMax; | ||
|
||
var xy = new[] { xMin, yMin, xMax, yMax }; | ||
Reproject.ReprojectPoints(xy, new double[] { 0, 0 }, sourceProjection, _wgs84Projection, 0, 2); | ||
|
||
xMin = xy[0]; | ||
yMin = xy[1]; | ||
xMax = xy[2]; | ||
yMax = xy[3]; | ||
var rectangle = new Box(xMin, xMax, yMin, yMax); | ||
return rectangle; | ||
} | ||
|
||
public static List<IFeature> ReprojectPolygonsToWGS84(FeatureSet polygons) | ||
{ | ||
if (polygons == null) throw new ArgumentNullException("polygons"); | ||
|
||
polygons.Reproject(_wgs84Projection); | ||
return Enumerable.ToList(polygons.Features); | ||
} | ||
|
||
public static Extent ReprojectExtentToWGS84(Extent sourceExtent, ProjectionInfo sourceProjection) | ||
{ | ||
if (sourceExtent == null) throw new ArgumentNullException("sourceBox"); | ||
if (sourceProjection == null) throw new ArgumentNullException("sourceProjection"); | ||
|
||
var MinX = sourceExtent.MinX; | ||
var MinY = sourceExtent.MinY; | ||
var MaxX = sourceExtent.MaxX; | ||
var MaxY = sourceExtent.MaxY; | ||
|
||
var xy = new double[] { MinX, MinY, MaxX, MaxY }; | ||
Reproject.ReprojectPoints(xy, new double[] { 0, 0 }, sourceProjection, _wgs84Projection, 0, 2); | ||
|
||
MinX = xy[0]; | ||
MinY = xy[1]; | ||
MaxX = xy[2]; | ||
MaxY = xy[3]; | ||
var rectangle = new Extent(MinX, MinY, MaxX, MaxY); | ||
return rectangle; | ||
} | ||
|
||
#endregion | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using DotSpatial.Controls; | ||
using DotSpatial.Data; | ||
using DotSpatial.Projections; | ||
using FacetedSearch3.Area; | ||
using FacetedSearch3.Properties; | ||
|
||
namespace FacetedSearch3.Area | ||
{ | ||
static class AreaHelper | ||
{ | ||
#region Fields | ||
|
||
private static readonly ProjectionInfo _wgs84Projection = ProjectionInfo.FromEsriString(Resources.wgs_84_esri_string); | ||
|
||
#endregion | ||
|
||
#region Public methods | ||
|
||
public static IEnumerable<IMapPolygonLayer> GetAllPolygonLayers(Map map) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
return map.GetAllLayers().OfType<IMapPolygonLayer>(); | ||
} | ||
|
||
public static IEnumerable<IMapPolygonLayer> GetAllSelectedPolygonLayers(Map map) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
return GetAllPolygonLayers(map) | ||
.Where(subLayer => subLayer.IsVisible && | ||
subLayer.IsSelected); | ||
} | ||
|
||
public static void SelectFirstVisiblePolygonLayer(Map map, bool isWorldTemplate) | ||
{ | ||
if (map == null) throw new ArgumentNullException("map"); | ||
|
||
//special case: world project template | ||
if (isWorldTemplate) | ||
{ | ||
map.MapFrame.IsSelected = false; | ||
foreach (var layer in GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible)) | ||
{ | ||
layer.IsSelected = true; | ||
map.Legend.RefreshNodes(); | ||
break; | ||
} | ||
} | ||
|
||
if (map.MapFrame.IsSelected) return; //don't select layers if map frame is already selected | ||
|
||
var hasSelected = GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible) | ||
.Any(item => item.IsSelected); | ||
if (hasSelected) | ||
return; | ||
|
||
foreach (var layer in GetAllPolygonLayers(map).Where(subLayer => subLayer.IsVisible).Reverse<IMapPolygonLayer>()) | ||
{ | ||
layer.IsSelected = true; | ||
map.Legend.RefreshNodes(); | ||
break; | ||
} | ||
} | ||
|
||
public static Box ReprojectBoxToWGS84(Box sourceBox, ProjectionInfo sourceProjection) | ||
{ | ||
if (sourceBox == null) throw new ArgumentNullException("sourceBox"); | ||
if (sourceProjection == null) throw new ArgumentNullException("sourceProjection"); | ||
|
||
var xMin = sourceBox.XMin; | ||
var yMin = sourceBox.YMin; | ||
var xMax = sourceBox.XMax; | ||
var yMax = sourceBox.YMax; | ||
|
||
var xy = new[] { xMin, yMin, xMax, yMax }; | ||
Reproject.ReprojectPoints(xy, new double[] { 0, 0 }, sourceProjection, _wgs84Projection, 0, 2); | ||
|
||
xMin = xy[0]; | ||
yMin = xy[1]; | ||
xMax = xy[2]; | ||
yMax = xy[3]; | ||
var rectangle = new Box(xMin, xMax, yMin, yMax); | ||
return rectangle; | ||
} | ||
|
||
public static List<IFeature> ReprojectPolygonsToWGS84(FeatureSet polygons) | ||
{ | ||
if (polygons == null) throw new ArgumentNullException("polygons"); | ||
|
||
polygons.Reproject(_wgs84Projection); | ||
return Enumerable.ToList(polygons.Features); | ||
} | ||
|
||
public static Extent ReprojectExtentToWGS84(Extent sourceExtent, ProjectionInfo sourceProjection) | ||
{ | ||
if (sourceExtent == null) throw new ArgumentNullException("sourceBox"); | ||
if (sourceProjection == null) throw new ArgumentNullException("sourceProjection"); | ||
|
||
var MinX = sourceExtent.MinX; | ||
var MinY = sourceExtent.MinY; | ||
var MaxX = sourceExtent.MaxX; | ||
var MaxY = sourceExtent.MaxY; | ||
|
||
var xy = new double[] { MinX, MinY, MaxX, MaxY }; | ||
Reproject.ReprojectPoints(xy, new double[] { 0, 0 }, sourceProjection, _wgs84Projection, 0, 2); | ||
|
||
MinX = xy[0]; | ||
MinY = xy[1]; | ||
MaxX = xy[2]; | ||
MaxY = xy[3]; | ||
var rectangle = new Extent(MinX, MinY, MaxX, MaxY); | ||
return rectangle; | ||
} | ||
|
||
#endregion | ||
} | ||
} |
60 changes: 30 additions & 30 deletions
60
...s.FacetedSearch/FacetedSearch/Area/Box.cs → ...s.FacetedSearch/FacetedSearch/Area/Box.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace FacetedSearch3.Area | ||
{ | ||
|
||
// Represents a latitude / longitude bounding box. | ||
public class Box | ||
{ | ||
public Box(double xMin, double xMax, double yMin, double yMax) | ||
{ | ||
XMin = xMin; | ||
XMax = xMax; | ||
YMax = yMax; | ||
YMin = yMin; | ||
} | ||
|
||
public double XMax { get; set;} | ||
|
||
public double XMin { get; set; } | ||
|
||
public double YMax { get; set; } | ||
|
||
public double YMin { get; set; } | ||
|
||
//public override string ToString(); | ||
} | ||
} | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace FacetedSearch3.Area | ||
{ | ||
|
||
// Represents a latitude / longitude bounding box. | ||
public class Box | ||
{ | ||
public Box(double xMin, double xMax, double yMin, double yMax) | ||
{ | ||
XMin = xMin; | ||
XMax = xMax; | ||
YMax = yMax; | ||
YMin = yMin; | ||
} | ||
|
||
public double XMax { get; set;} | ||
|
||
public double XMin { get; set; } | ||
|
||
public double YMax { get; set; } | ||
|
||
public double YMin { get; set; } | ||
|
||
//public override string ToString(); | ||
} | ||
} |
Oops, something went wrong.