├── .gitignore
├── Bin
├── Icons
│ ├── Earth.ico
│ ├── EditingPolygonTool16.png
│ ├── ElementLine16.png
│ ├── NewDocument.png
│ ├── Open16.png
│ ├── PanTool16.png
│ ├── Point16.png
│ ├── Save16.png
│ ├── Select.png
│ ├── SelectionSelect.png
│ ├── SelectionUnselect.png
│ ├── check01.png
│ ├── check02.png
│ ├── internet.ico
│ ├── layers.png
│ ├── lightbulb.png
│ ├── lightbulb_lit.png
│ └── tradi.ico
└── gpc.dll
├── Dependents
└── GDAL19
│ ├── SQLite3.dll
│ ├── gdal19.dll
│ ├── gdal_csharp.dll
│ ├── gdal_wrap.dll
│ ├── gdalconst_csharp.dll
│ ├── gdalconst_wrap.dll
│ ├── geos_c.dll
│ ├── hd426m.dll
│ ├── hdf5dll.dll
│ ├── hm426m.dll
│ ├── libeay32.dll
│ ├── libiconv-2.dll
│ ├── libintl-8.dll
│ ├── libpq.dll
│ ├── ogr_csharp.dll
│ ├── ogr_wrap.dll
│ ├── osr_csharp.dll
│ ├── osr_wrap.dll
│ ├── proj.dll
│ ├── ssleay32.dll
│ ├── szip.dll
│ └── zlib1.dll
├── Doc
├── 依赖项和开发说明.txt
└── 开发计划.txt
├── GpcWrapper
├── A.plg
├── GpcTest.cs
├── GpcTest.exe
├── GpcWrapper.cs
├── GpcWrapper.html
├── TestAppBinary
│ ├── A.plg
│ ├── GpcTest.exe
│ └── gpc.dll
├── TestProjectVS2010
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── GPC-README.pdf
│ ├── GpcTest.sln
│ ├── GpcWrapper.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── RGeos.GPCWapper.csproj
│ ├── RGeos.GPCWapper.csproj.user
│ ├── app.config
│ └── gpc.dll
├── TestProjectVS8
│ ├── AssemblyInfo.cs
│ ├── Form1.Designer.cs
│ ├── Form1.cs
│ ├── GpcWrapper.cs
│ ├── Program.cs
│ ├── Test.csproj
│ ├── Test.sln
│ └── gpc.dll
├── compile.cmd
├── gpc.c
├── gpc.dll
├── gpc.h
└── html
│ ├── gpc_wrapper.html
│ ├── gpcdll.html
│ ├── gpctest.jpg
│ ├── installdotnet.html
│ ├── reference.html
│ └── use_gpc_wrapper.html
├── LICENSE
├── ProjNet
├── BuildProcessTemplates
│ ├── DefaultTemplate.11.1.xaml
│ ├── DefaultTemplate.xaml
│ ├── LabDefaultTemplate.11.xaml
│ └── UpgradeTemplate.xaml
├── DemoApp_Silverlight
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Page.xaml
│ ├── Page.xaml.cs
│ ├── ProjNet.Silverlight.TestApplication.csproj
│ ├── ProjNet.Silverlight.TestApplication.csproj.user
│ ├── ProjNet.Silverlight.TestApplication.csproj.vspscc
│ ├── Properties
│ │ ├── AppManifest.xml
│ │ └── AssemblyInfo.cs
│ └── epsg4326.jpg
├── DemoWebApp
│ ├── App_Code
│ │ └── SRIDReader.cs
│ ├── App_Data
│ │ └── SRID.csv
│ ├── Default.aspx
│ ├── Default.aspx.cs
│ ├── Silverlight.js
│ ├── SilverlightTestPage.html
│ └── Web.Config
├── ExternalReferences
│ ├── nunit.framework.dll
│ └── nunit.framework.xml
├── ProjNET.sln
├── ProjNET.suo
├── ProjNET.vssscc
├── ProjNet.Silverlight
│ ├── Extensions.cs
│ ├── ProjNet.Silverlight.csproj
│ ├── ProjNet.Silverlight.csproj.user
│ ├── ProjNet.Silverlight.csproj.vspscc
│ └── Properties
│ │ └── AssemblyInfo.cs
├── ProjNet.vsmdi
├── ProjNetWinFormTest
│ ├── Form1.Designer.cs
│ ├── Form1.cs
│ ├── Form1.resx
│ ├── Program.cs
│ ├── ProjNetWinFormTest.csproj
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── SharpMap.CoordinateSystems.Tests
│ ├── CoordinateTransformTests.cs
│ ├── ProjNET.Tests.csproj
│ ├── ProjNET.Tests.csproj.user
│ ├── ProjNET.Tests.csproj.vspscc
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SRID.csv
│ ├── SRIDReader.cs
│ └── WKT
│ │ └── WKTCoordSysParserTests.cs
├── SharpMap.CoordinateSystems
│ ├── ClassDiagram1.cd
│ ├── CoordinateSystems
│ │ ├── AngularUnit.cs
│ │ ├── AxisInfo.cs
│ │ ├── AxisOrientationEnum.cs
│ │ ├── CoordinateSystem.cs
│ │ ├── CoordinateSystemFactory.cs
│ │ ├── Datum.cs
│ │ ├── DatumType.cs
│ │ ├── Ellipsoid.cs
│ │ ├── GeocentricCoordinateSystem.cs
│ │ ├── GeographicCoordinateSystem.cs
│ │ ├── GeographicTransform.cs
│ │ ├── HorizontalCoordinateSystem.cs
│ │ ├── HorizontalDatum.cs
│ │ ├── IAngularUnit.cs
│ │ ├── ICompoundCoordinateSystem.cs
│ │ ├── ICoordinateSystem.cs
│ │ ├── ICoordinateSystemFactory.cs
│ │ ├── IDatum.cs
│ │ ├── IEllipsoid.cs
│ │ ├── IFittedCoordinateSystem.cs
│ │ ├── IGeocentricCoordinateSystem.cs
│ │ ├── IGeodeticSpatialReference.cs
│ │ ├── IGeographicCoordinateSystem.cs
│ │ ├── IGeographicTransform.cs
│ │ ├── IHorizontalCoordinateSystem.cs
│ │ ├── IHorizontalDatum.cs
│ │ ├── IInfo.cs
│ │ ├── ILinearUnit.cs
│ │ ├── ILocalCoordinateSystem.cs
│ │ ├── ILocalDatum.cs
│ │ ├── IParameterInfo.cs
│ │ ├── IPrimeMeridian.cs
│ │ ├── IProjectedCoordinateSystem.cs
│ │ ├── IProjection.cs
│ │ ├── ISpatialReferenceFactory.cs
│ │ ├── IUnit.cs
│ │ ├── IVerticalCoordinateSystem.cs
│ │ ├── IVerticalDatum.cs
│ │ ├── Info.cs
│ │ ├── LinearUnit.cs
│ │ ├── Parameter.cs
│ │ ├── PrimeMeridian.cs
│ │ ├── ProjectedCoordinateSystem.cs
│ │ ├── Projection.cs
│ │ ├── ProjectionParameter.cs
│ │ ├── Projections
│ │ │ ├── AlbersProjection.cs
│ │ │ ├── GaussKrugerProjection.cs
│ │ │ ├── KrovakProjection.cs
│ │ │ ├── LambertConformalConic.cs
│ │ │ ├── MapProjection.cs
│ │ │ ├── Mercator.cs
│ │ │ └── TransverseMercator.cs
│ │ ├── SREnvironment
│ │ │ ├── RgSRDatumType.cs
│ │ │ ├── RgSRGeoCSType.cs
│ │ │ ├── RgSRProjectionType.cs
│ │ │ ├── RgSRSpheroid2Type.cs
│ │ │ ├── RgSRSpheroidType.cs
│ │ │ └── SpatialReferenceEnvironmentClass.cs
│ │ ├── Transformations
│ │ │ ├── ConcatenatedTransform.cs
│ │ │ ├── CoordinateTransformation.cs
│ │ │ ├── CoordinateTransformationAuthorityFactory.cs
│ │ │ ├── CoordinateTransformationFactory.cs
│ │ │ ├── DatumTransform.cs
│ │ │ ├── DomainFlags.cs
│ │ │ ├── GeocentricTransform.cs
│ │ │ ├── GeographicTransform.cs
│ │ │ ├── ICoordinateSystemAuthorityFactory.cs
│ │ │ ├── ICoordinateTransformation.cs
│ │ │ ├── ICoordinateTransformationAuthorityFactory.cs
│ │ │ ├── ICoordinateTransformationFactory.cs
│ │ │ ├── IMathTransform.cs
│ │ │ ├── IMathTransformFactory.cs
│ │ │ ├── MathTransform.cs
│ │ │ └── TransformType.cs
│ │ ├── Unit.cs
│ │ └── WGS84ConversionInfo.cs
│ ├── IO
│ │ └── CoordinateSystems
│ │ │ ├── CoordinateSystemWktReader.cs
│ │ │ ├── StreamTokenizer.cs
│ │ │ ├── TokenType.cs
│ │ │ └── WKTStreamTokenizer.cs
│ ├── ProjNET.csproj
│ ├── ProjNET.csproj.user
│ ├── ProjNET.csproj.vspscc
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── scskey.snk
├── UnitTests
│ ├── CoordinateTransformTests.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── SRID.csv
│ ├── UnitTests.csproj
│ ├── UnitTests.csproj.vspscc
│ └── WKT
│ │ └── WKTCoordSysParserTests.cs
└── localtestrun.testrunconfig
├── README.md
├── RGeos-Logo.png
├── RGeos.Carto
├── AffineTransformation2D.cs
├── ColorBlend.cs
├── FetureLayer.cs
├── GeometryTransform.cs
├── ILayer.cs
├── IMap.cs
├── ISelection.cs
├── ISnapPoint.cs
├── Layer.cs
├── Map.cs
├── MapSelection.cs
├── Properties
│ └── AssemblyInfo.cs
├── RGeos.Carto.csproj
├── RasterLayer.cs
├── RgEnumShapeType.cs
└── SnapPointBase.cs
├── RGeos.Controls
├── IGraphicContainer.cs
├── IMapControl2.cs
├── Properties
│ └── AssemblyInfo.cs
├── RGeos.Controls.csproj
├── RgMapControl.Designer.cs
├── RgMapControl.cs
├── RgMapControl.resx
├── RgTocControl.Designer.cs
├── RgTocControl.cs
└── RgTocControl.resx
├── RGeos.Core
├── HookHelper.cs
├── ICommand.cs
├── IMapControl.cs
├── ITool.cs
├── ITransformation.cs
├── Properties
│ └── AssemblyInfo.cs
├── RBaseCommand.cs
├── RGeos.Core.csproj
└── RgeosUnits.cs
├── RGeos.Desktop
├── ControlCommands
│ ├── DrawPointTool.cs
│ ├── DrawPolygonTool.cs
│ ├── DrawPolylineTool.cs
│ ├── IPickUpPoint.cs
│ ├── PanTool.cs
│ ├── PickUpPointTool.cs
│ ├── SelectTool.cs
│ └── UnSelectCommand.cs
├── Earth.ico
├── FrmAbout.Designer.cs
├── FrmAbout.cs
├── FrmAbout.resx
├── FrmGridLineOrPoint.Designer.cs
├── FrmGridLineOrPoint.cs
├── FrmGridLineOrPoint.resx
├── FrmImportXY.Designer.cs
├── FrmImportXY.cs
├── FrmImportXY.resx
├── FrmLayers.Designer.cs
├── FrmLayers.cs
├── IRgFileFormat.cs
├── MainFrm.Designer.cs
├── MainFrm.cs
├── MainFrm.resx
├── Program.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── RGeos.Desktop.csproj
├── RGeos.Desktop.csproj.user
├── SelectionRectangle.cs
├── ToolBox
│ ├── Angle.cs
│ ├── ExcelPointPair.cs
│ ├── FrmGaussProjection.cs
│ ├── FrmGaussProjection.designer.cs
│ ├── FrmGaussProjection.resx
│ ├── FrmSevenParams.Designer.cs
│ ├── FrmSevenParams.cs
│ ├── FrmSevenParams.resx
│ ├── IPointPairDAL.cs
│ ├── Radian.cs
│ ├── RgPointPair.cs
│ ├── SurveryMath.cs
│ └── ZMath.cs
├── app.config
├── frmLayers.resx
├── frmNewFeatureClass.Designer.cs
├── frmNewFeatureClass.cs
├── frmNewFeatureClass.resx
└── tradi.ico
├── RGeos.Display
├── IDisplayFeedback.cs
├── IDisplayTransformation.cs
├── IScreenDisplay.cs
├── ISymbol.cs
├── Properties
│ └── AssemblyInfo.cs
├── RGeos.Display.csproj
└── SimpleMarkerSymbol.cs
├── RGeos.Geometries
├── Basic
│ ├── MathEx.cs
│ ├── Matrix.cs
│ └── RgMath.cs
├── BoundingBox.cs
├── Converters
│ ├── WellKnownBinary
│ │ ├── GeometryFromWKB.cs
│ │ ├── GeometryToWKB.cs
│ │ ├── WKBByteOrder.cs
│ │ └── WKBGeometryType.cs
│ └── WellKnownText
│ │ ├── GeometryFromWKT.cs
│ │ ├── GeometryToWKT.cs
│ │ ├── SpatialReference.cs
│ │ ├── StreamTokenizer.cs
│ │ ├── TokenType.cs
│ │ └── WKTStreamTokenizer.cs
├── Curve.cs
├── Geometry.cd
├── Geometry.cs
├── GeometryCollection.cs
├── GeometryType.cs
├── IGeometry.cs
├── IGeometryCollection.cs
├── ISpatialReference.cs
├── LineString.cs
├── LinearRing.cs
├── MultiCurve.cs
├── MultiLineString.cs
├── MultiPoint.cs
├── MultiPolygon.cs
├── MultiSurface.cs
├── Point.cs
├── Point3D.cs
├── Polygon.cs
├── Properties
│ └── AssemblyInfo.cs
├── RGeos.Geometries.csproj
├── RGeos.Geometries.csproj.user
├── RgLine.cs
├── RgPlane.cs
├── RgSegment.cs
├── Spatial
│ ├── HitUtil.cs
│ ├── RgAreaMeasure.cs
│ ├── RgDistanceMeasure.cs
│ ├── RgSpatialAnalysis.cs
│ ├── RgTopologicOperator.cs
│ └── RgTopologicRelationship.cs
├── SpatialRelations.cs
├── Surface.cs
└── Vector3d.cs
├── RGeos.sln
└── RGeos
├── Basic
├── MathEx.cs
└── RMath.cs
├── Converters
├── WellKnownBinary
│ ├── GeometryFromWKB.cs
│ ├── GeometryToWKB.cs
│ ├── WKBByteOrder.cs
│ └── WKBGeometryType.cs
└── WellKnownText
│ ├── GeometryFromWKT.cs
│ ├── GeometryToWKT.cs
│ ├── SpatialReference.cs
│ ├── StreamTokenizer.cs
│ ├── TokenType.cs
│ └── WKTStreamTokenizer.cs
├── CoordinateSystems
└── Transformations
│ └── GeometryTransform.cs
├── FrmPartialRefresh.Designer.cs
├── FrmPartialRefresh.cs
├── FrmPartialRefresh.resx
├── Geometries
├── BoundingBox.cs
├── Curve.cs
├── Geometry.cd
├── Geometry.cs
├── GeometryCollection.cs
├── GeometryType.cs
├── IGeometry.cs
├── IGeometryCollection.cs
├── ISpatialReference.cs
├── LineString.cs
├── LinearRing.cs
├── MultiCurve.cs
├── MultiLineString.cs
├── MultiPoint.cs
├── MultiPolygon.cs
├── MultiSurface.cs
├── Point.cs
├── Point3D.cs
├── Polygon.cs
├── SpatialRelations.cs
└── Surface.cs
├── Geometry
├── RArc.cs
├── RCircle.cs
├── REnvelope.cs
├── RGeometry.cs
├── RLine.cs
├── RPlane.cs
├── RPoint.cs
├── RPointCollection.cs
├── RPolygon.cs
├── RPolyline.cs
├── RRay.cs
├── RRing.cs
├── RSegment.cs
├── RSphere.cs
├── RTriangle.cs
└── Vector3d.cs
├── Measure
├── RAreaMeasure.cs
└── RDistanceMeasure.cs
├── PluginEngine
├── HookHelper.cs
├── ICommand.cs
├── IDisplayFeedback.cs
├── IDisplayTransformation.cs
├── ILayer.cs
├── IMap.cs
├── IMapControl.cs
├── IScreenDisplay.cs
├── ISelection.cs
├── ISymbol.cs
├── ITool.cs
├── Layer.cs
├── Map.cs
├── RBaseCommand.cs
├── RgeosUnits.cs
├── Transform.cs
├── UcMapControl.Designer.cs
├── UcMapControl.cs
└── UcMapControl.resx
├── Plugins
├── DrawLineTool.cs
├── DrawMultiPolygonTool.cs
├── DrawPointTool.cs
└── DrawPolylineTool.cs
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── RGeos.First.csproj
├── RGeos.First.sln
├── SpatialAnalysis
└── RSpatialAnalysis.cs
├── Topology
├── TopologicOperate.cs
└── TopologicRelationship.cs
├── Utilities
└── Transform.cs
└── app.config
/.gitignore:
--------------------------------------------------------------------------------
1 | /RGeos/obj
2 | /RGeos/bin
3 |
4 | /GpcWrapper/TestProjectVS2010/obj
5 |
6 | /GpcWrapper/TestProjectVS2010/bin
7 |
8 | /ProjNet/DemoWebApp/Bin
9 | /ProjNet/DemoWebApp/ClientBin
10 |
11 | /ProjNet/DemoApp_Silverlight/obj
12 | /ProjNet/DemoApp_Silverlight/Bin
13 |
14 | /ProjNet/ProjNet.Silverlight/obj
15 | /ProjNet/ProjNet.Silverlight/Bin
16 |
17 | /ProjNet/SharpMap.CoordinateSystems.Tests/obj
18 | /ProjNet/SharpMap.CoordinateSystems.Tests/bin
19 |
20 | /ProjNet/ProjNetWinFormTest/obj
21 | /ProjNet/ProjNetWinFormTest/bin
22 |
23 | /ProjNet/SharpMap.CoordinateSystems.Tests/obj
24 | /ProjNet/SharpMap.CoordinateSystems.Tests/bin
25 |
26 | /ProjNet/SharpMap.CoordinateSystems/obj
27 | /ProjNet/SharpMap.CoordinateSystems/bin
28 |
29 | /RGeos.Controls/bin
30 | /RGeos.Controls/obj
31 |
32 | /RGeos.Desktop/bin
33 | /RGeos.Desktop/obj
34 |
35 | /RGeos.Display/obj
36 |
37 | /RGeos.Geometries/obj
38 |
39 | /RGeos.Carto/bin
40 | /RGeos.Carto/obj
41 |
42 | /RGeos.Core/obj
43 |
--------------------------------------------------------------------------------
/Bin/Icons/Earth.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/Earth.ico
--------------------------------------------------------------------------------
/Bin/Icons/EditingPolygonTool16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/EditingPolygonTool16.png
--------------------------------------------------------------------------------
/Bin/Icons/ElementLine16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/ElementLine16.png
--------------------------------------------------------------------------------
/Bin/Icons/NewDocument.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/NewDocument.png
--------------------------------------------------------------------------------
/Bin/Icons/Open16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/Open16.png
--------------------------------------------------------------------------------
/Bin/Icons/PanTool16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/PanTool16.png
--------------------------------------------------------------------------------
/Bin/Icons/Point16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/Point16.png
--------------------------------------------------------------------------------
/Bin/Icons/Save16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/Save16.png
--------------------------------------------------------------------------------
/Bin/Icons/Select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/Select.png
--------------------------------------------------------------------------------
/Bin/Icons/SelectionSelect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/SelectionSelect.png
--------------------------------------------------------------------------------
/Bin/Icons/SelectionUnselect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/SelectionUnselect.png
--------------------------------------------------------------------------------
/Bin/Icons/check01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/check01.png
--------------------------------------------------------------------------------
/Bin/Icons/check02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/check02.png
--------------------------------------------------------------------------------
/Bin/Icons/internet.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/internet.ico
--------------------------------------------------------------------------------
/Bin/Icons/layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/layers.png
--------------------------------------------------------------------------------
/Bin/Icons/lightbulb.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/lightbulb.png
--------------------------------------------------------------------------------
/Bin/Icons/lightbulb_lit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/lightbulb_lit.png
--------------------------------------------------------------------------------
/Bin/Icons/tradi.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/Icons/tradi.ico
--------------------------------------------------------------------------------
/Bin/gpc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Bin/gpc.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/SQLite3.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/SQLite3.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/gdal19.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/gdal19.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/gdal_csharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/gdal_csharp.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/gdal_wrap.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/gdal_wrap.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/gdalconst_csharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/gdalconst_csharp.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/gdalconst_wrap.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/gdalconst_wrap.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/geos_c.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/geos_c.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/hd426m.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/hd426m.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/hdf5dll.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/hdf5dll.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/hm426m.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/hm426m.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/libeay32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/libeay32.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/libiconv-2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/libiconv-2.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/libintl-8.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/libintl-8.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/libpq.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/libpq.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/ogr_csharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/ogr_csharp.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/ogr_wrap.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/ogr_wrap.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/osr_csharp.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/osr_csharp.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/osr_wrap.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/osr_wrap.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/proj.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/proj.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/ssleay32.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/ssleay32.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/szip.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/szip.dll
--------------------------------------------------------------------------------
/Dependents/GDAL19/zlib1.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Dependents/GDAL19/zlib1.dll
--------------------------------------------------------------------------------
/Doc/依赖项和开发说明.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Doc/依赖项和开发说明.txt
--------------------------------------------------------------------------------
/Doc/开发计划.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/Doc/开发计划.txt
--------------------------------------------------------------------------------
/GpcWrapper/A.plg:
--------------------------------------------------------------------------------
1 | 2
2 | 34
3 | 1
4 | 159.500000000000000 167.500000000000000
5 | 93.500000000000000 167.500000000000000
6 | 82.000000000000000 193.500000000000000
7 | 78.750000000000000 202.000000000000000
8 | 77.750000000000000 208.000000000000000
9 | 78.750000000000000 211.500000000000000
10 | 81.500000000000000 214.750000000000000
11 | 87.250000000000000 217.000000000000000
12 | 97.500000000000000 218.500000000000000
13 | 97.500000000000000 223.000000000000000
14 | 43.750000000000000 223.000000000000000
15 | 43.750000000000000 218.500000000000000
16 | 52.500000000000000 216.250000000000000
17 | 57.500000000000000 213.500000000000000
18 | 60.750000000000000 210.000000000000000
19 | 64.250000000000000 204.750000000000000
20 | 68.000000000000000 198.000000000000000
21 | 71.750000000000000 189.750000000000000
22 | 131.750000000000000 53.500000000000000
23 | 136.250000000000000 53.500000000000000
24 | 195.500000000000000 191.250000000000000
25 | 202.500000000000000 205.000000000000000
26 | 208.500000000000000 212.750000000000000
27 | 215.500000000000000 216.750000000000000
28 | 224.750000000000000 218.500000000000000
29 | 224.750000000000000 223.000000000000000
30 | 157.500000000000000 223.000000000000000
31 | 157.500000000000000 218.500000000000000
32 | 166.000000000000000 217.250000000000000
33 | 171.250000000000000 215.000000000000000
34 | 174.000000000000000 212.000000000000000
35 | 175.000000000000000 208.250000000000000
36 | 173.750000000000000 201.250000000000000
37 | 169.750000000000000 191.250000000000000
38 | 3
39 | 0
40 | 156.000000000000000 158.500000000000000
41 | 127.000000000000000 91.500000000000000
42 | 97.500000000000000 158.500000000000000
43 |
--------------------------------------------------------------------------------
/GpcWrapper/GpcTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/GpcTest.exe
--------------------------------------------------------------------------------
/GpcWrapper/GpcWrapper.html:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 | GpcWrapper
6 |
7 |
8 | GpcWrapper
9 |
10 |
11 | The GpcWrapper makes the Gpc-library available for .Net Programs. It contains some .Net-classes that mirrors the
12 | gpc-structs for polygons, tristrips, ...
13 |
14 |
15 |
16 | The steps necessary to use it are described below.
17 | First you have to generate a .dll-File from the gpc.c and gpc.h file.
18 | Afterwards you can compile your C# Program together with the File GpcWrapper.cs (using the GpcWrapper with another .Net language is not
19 | described here). The gpc.dll will be loaded at execution time. So it has to be located e.g. in the same directory
20 | as the compiled Program.
21 |
22 |
23 |
24 | Changes necessary in gpc and creating a gpc-dll.
25 | Compiling the GpcWrapper.
26 | Using the GpcWrapper.
27 | GpcWrapper reference
28 |
29 |
30 | Stefan Menne
31 | stefan.men@web.de
32 | 10.3.2004
33 |
34 |
--------------------------------------------------------------------------------
/GpcWrapper/TestAppBinary/A.plg:
--------------------------------------------------------------------------------
1 | 2
2 | 34
3 | 1
4 | 159.500000000000000 167.500000000000000
5 | 93.500000000000000 167.500000000000000
6 | 82.000000000000000 193.500000000000000
7 | 78.750000000000000 202.000000000000000
8 | 77.750000000000000 208.000000000000000
9 | 78.750000000000000 211.500000000000000
10 | 81.500000000000000 214.750000000000000
11 | 87.250000000000000 217.000000000000000
12 | 97.500000000000000 218.500000000000000
13 | 97.500000000000000 223.000000000000000
14 | 43.750000000000000 223.000000000000000
15 | 43.750000000000000 218.500000000000000
16 | 52.500000000000000 216.250000000000000
17 | 57.500000000000000 213.500000000000000
18 | 60.750000000000000 210.000000000000000
19 | 64.250000000000000 204.750000000000000
20 | 68.000000000000000 198.000000000000000
21 | 71.750000000000000 189.750000000000000
22 | 131.750000000000000 53.500000000000000
23 | 136.250000000000000 53.500000000000000
24 | 195.500000000000000 191.250000000000000
25 | 202.500000000000000 205.000000000000000
26 | 208.500000000000000 212.750000000000000
27 | 215.500000000000000 216.750000000000000
28 | 224.750000000000000 218.500000000000000
29 | 224.750000000000000 223.000000000000000
30 | 157.500000000000000 223.000000000000000
31 | 157.500000000000000 218.500000000000000
32 | 166.000000000000000 217.250000000000000
33 | 171.250000000000000 215.000000000000000
34 | 174.000000000000000 212.000000000000000
35 | 175.000000000000000 208.250000000000000
36 | 173.750000000000000 201.250000000000000
37 | 169.750000000000000 191.250000000000000
38 | 3
39 | 0
40 | 156.000000000000000 158.500000000000000
41 | 127.000000000000000 91.500000000000000
42 | 97.500000000000000 158.500000000000000
43 |
--------------------------------------------------------------------------------
/GpcWrapper/TestAppBinary/GpcTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/TestAppBinary/GpcTest.exe
--------------------------------------------------------------------------------
/GpcWrapper/TestAppBinary/gpc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/TestAppBinary/gpc.dll
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Windows;
7 |
8 | namespace GpcTest
9 | {
10 | ///
11 | /// Interaktionslogik für "App.xaml"
12 | ///
13 | public partial class App : Application
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/GPC-README.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/TestProjectVS2010/GPC-README.pdf
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/GpcTest.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual C# Express 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GpcTest", "GpcTest.csproj", "{BE646C57-295F-4309-8866-F265423F92F6}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {BE646C57-295F-4309-8866-F265423F92F6}.Debug|x86.ActiveCfg = Debug|x86
13 | {BE646C57-295F-4309-8866-F265423F92F6}.Debug|x86.Build.0 = Debug|x86
14 | {BE646C57-295F-4309-8866-F265423F92F6}.Release|x86.ActiveCfg = Release|x86
15 | {BE646C57-295F-4309-8866-F265423F92F6}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.1008
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace RGeos.GPCWapper.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/RGeos.GPCWapper.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS2010/gpc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/TestProjectVS2010/gpc.dll
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS8/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Test")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Test")]
13 | [assembly: AssemblyCopyright("Copyright Stefan Menne")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("d55b1346-c06c-4b0f-b89d-8236c394b9c0")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS8/Form1.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace Test
2 | {
3 | partial class Form1
4 | {
5 | ///
6 | /// Required designer variable.
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// Clean up any resources being used.
12 | ///
13 | /// true if managed resources should be disposed; otherwise, false.
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region Windows Form Designer generated code
24 |
25 | ///
26 | /// Required method for Designer support - do not modify
27 | /// the contents of this method with the code editor.
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.components = new System.ComponentModel.Container();
32 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
33 | this.Text = "Form1";
34 | }
35 |
36 | #endregion
37 | }
38 | }
39 |
40 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS8/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Windows.Forms;
4 |
5 | namespace Test
6 | {
7 | static class Program
8 | {
9 | ///
10 | /// The main entry point for the application.
11 | ///
12 | [STAThread]
13 | static void Main()
14 | {
15 | Application.EnableVisualStyles();
16 | Application.SetCompatibleTextRenderingDefault(false);
17 | Application.Run(new Form1());
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS8/Test.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 9.00
3 | # Visual C# Express 2005
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test.csproj", "{1DF2AC3B-2C42-42FA-9CCA-A4FE6A798F81}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {1DF2AC3B-2C42-42FA-9CCA-A4FE6A798F81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {1DF2AC3B-2C42-42FA-9CCA-A4FE6A798F81}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {1DF2AC3B-2C42-42FA-9CCA-A4FE6A798F81}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {1DF2AC3B-2C42-42FA-9CCA-A4FE6A798F81}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/GpcWrapper/TestProjectVS8/gpc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/TestProjectVS8/gpc.dll
--------------------------------------------------------------------------------
/GpcWrapper/compile.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | call "c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\vcvars32.bat"
3 | rem cl /LD /MD gpc.c
4 | csc /out:"GpcTest.exe" /target:winexe GpcWrapper.cs GpcTest.cs /r:System.dll,System.Windows.Forms.dll,System.Drawing.dll
5 | Pause
--------------------------------------------------------------------------------
/GpcWrapper/gpc.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/gpc.dll
--------------------------------------------------------------------------------
/GpcWrapper/html/gpc_wrapper.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | Compiling the gpc-Wrapper
7 |
8 |
9 | Compiling the gpc-Wrapper
10 |
11 | To compile the Gpc-Wrapper simply add the file GpcWrapper.cs into your project. As an example in the
12 | file compile.cmd the GpcWrapper is compiled together with a Test-Application GpcTest.cs.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/GpcWrapper/html/gpctest.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/GpcWrapper/html/gpctest.jpg
--------------------------------------------------------------------------------
/GpcWrapper/html/installdotnet.html:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 | Installing the .Net-Framework
7 |
8 |
9 | Installing the .Net-Framework
10 |
11 | To install the .Net-Framework you only have to execute the File dotnetfx.exe, which you can download
12 | from the Microsoft Download Center.
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/App.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Net;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Documents;
8 | using System.Windows.Input;
9 | using System.Windows.Media;
10 | using System.Windows.Media.Animation;
11 | using System.Windows.Shapes;
12 |
13 | namespace ProjNet.Silverlight.TestApplication
14 | {
15 | public partial class App : Application
16 | {
17 |
18 | public App()
19 | {
20 | this.Startup += this.Application_Startup;
21 | this.Exit += this.Application_Exit;
22 | this.UnhandledException += this.Application_UnhandledException;
23 |
24 | InitializeComponent();
25 | }
26 |
27 | private void Application_Startup(object sender, StartupEventArgs e)
28 | {
29 | this.RootVisual = new Page();
30 | }
31 |
32 | private void Application_Exit(object sender, EventArgs e)
33 | {
34 |
35 | }
36 | private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
37 | {
38 | // If the app is running outside of the debugger then report the exception using
39 | // the browser's exception mechanism. On IE this will display it a yellow alert
40 | // icon in the status bar and Firefox will display a script error.
41 | if (!System.Diagnostics.Debugger.IsAttached)
42 | {
43 |
44 | // NOTE: This will allow the application to continue running after an exception has been thrown
45 | // but not handled.
46 | // For production applications this error handling should be replaced with something that will
47 | // report the error to the website and stop the application.
48 | e.Handled = true;
49 | Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
50 | }
51 | }
52 | private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
53 | {
54 | try
55 | {
56 | string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
57 | errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
58 |
59 | System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight 2 Application " + errorMsg + "\");");
60 | }
61 | catch (Exception)
62 | {
63 | }
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/Page.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/Page.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 | using System.Windows.Input;
5 | using ProjNet.CoordinateSystems;
6 | using ProjNet.CoordinateSystems.Transformations;
7 |
8 | namespace ProjNet.Silverlight.TestApplication
9 | {
10 | public partial class Page : UserControl
11 | {
12 | public Page()
13 | {
14 | InitializeComponent();
15 | }
16 |
17 | private void map_MouseMove(object sender, MouseEventArgs e)
18 | {
19 | Point p = e.GetPosition(map);
20 | double scale = 360 / map.ActualWidth;
21 | Point pGeo = new Point(p.X * scale - 180, 90 - p.Y * scale);
22 | locationLong.Text = string.Format("{0}", pGeo.X);
23 | locationLat.Text = string.Format("{0}", pGeo.Y);
24 |
25 | //Transform to UTM
26 | CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
27 | ICoordinateSystem wgs84geo = ProjNet.CoordinateSystems.GeographicCoordinateSystem.WGS84;
28 | int zone = (int)Math.Ceiling((pGeo.X + 180) / 6);
29 | ICoordinateSystem utm = ProjNet.CoordinateSystems.ProjectedCoordinateSystem.WGS84_UTM(zone, pGeo.Y > 0);
30 | ICoordinateTransformation trans = ctfac.CreateFromCoordinateSystems(wgs84geo, utm);
31 | Point pUtm = trans.MathTransform.Transform(pGeo);
32 | locationX.Text = string.Format("N{0}", pUtm.Y);
33 | locationY.Text = string.Format("E{0}", pUtm.X);
34 | locationZone.Text = string.Format("Zone {0}{1}", zone, pGeo.Y > 0 ? 'N' : 'S');
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/ProjNet.Silverlight.TestApplication.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | zh-CN
11 | false
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | DynamicPage
20 | True
21 | False
22 | False
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | True
32 |
33 |
34 | True
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/ProjNet.Silverlight.TestApplication.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/Properties/AppManifest.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("ProjNet.Silverlight.TestApplication")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("ProjNet.Silverlight.TestApplication")]
13 | [assembly: AssemblyCopyright("Copyright © 2009")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("fe26f298-9cff-425b-8cd1-d3bdd40b5b78")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ProjNet/DemoApp_Silverlight/epsg4326.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/DemoApp_Silverlight/epsg4326.jpg
--------------------------------------------------------------------------------
/ProjNet/DemoWebApp/App_Code/SRIDReader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using ProjNet.CoordinateSystems;
3 |
4 | public class SridReader
5 | {
6 | private static string filename = System.Web.HttpContext.Current.Server.MapPath("~/App_Data/SRID.csv");
7 |
8 | public struct WKTstring {
9 | ///
10 | /// Well-known ID
11 | ///
12 | public int WKID;
13 | ///
14 | /// Well-known Text
15 | ///
16 | public string WKT;
17 | }
18 |
19 | ///
20 | /// Enumerates all SRID's in the SRID.csv file.
21 | ///
22 | /// Enumerator
23 | public static IEnumerable GetSRIDs()
24 | {
25 | using (System.IO.StreamReader sr = System.IO.File.OpenText(filename))
26 | {
27 | while (!sr.EndOfStream)
28 | {
29 | string line = sr.ReadLine();
30 | int split = line.IndexOf(';');
31 | if (split > -1)
32 | {
33 | WKTstring wkt = new WKTstring();
34 | wkt.WKID = int.Parse(line.Substring(0, split));
35 | wkt.WKT = line.Substring(split + 1);
36 | yield return wkt;
37 | }
38 | }
39 | sr.Close();
40 | }
41 | }
42 | ///
43 | /// Gets a coordinate system from the SRID.csv file
44 | ///
45 | /// EPSG ID
46 | /// Coordinate system, or null if SRID was not found.
47 | public static ICoordinateSystem GetCSbyID(int id)
48 | {
49 | //TODO: Enhance this with an index so we don't have to loop all the lines
50 | ICoordinateSystemFactory fac = new CoordinateSystemFactory();
51 | foreach (SridReader.WKTstring wkt in SridReader.GetSRIDs())
52 | {
53 | if (wkt.WKID == id)
54 | {
55 | return ProjNet.Converters.WellKnownText.CoordinateSystemWktReader.Parse(wkt.WKT) as ICoordinateSystem;
56 | }
57 | }
58 | return null;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/ProjNet/DemoWebApp/Default.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
2 |
3 |
4 |
5 |
6 |
7 | Proj.NET Demo Application
8 |
9 |
10 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/ProjNet/DemoWebApp/Web.Config:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
13 |
14 |
20 |
21 |
26 |
27 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/ProjNet/ExternalReferences/nunit.framework.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/ExternalReferences/nunit.framework.dll
--------------------------------------------------------------------------------
/ProjNet/ProjNET.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/ProjNET.suo
--------------------------------------------------------------------------------
/ProjNet/ProjNET.vssscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/ProjNet.Silverlight/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using ProjNet.CoordinateSystems.Transformations;
4 |
5 | namespace ProjNet.CoordinateSystems
6 | {
7 | ///
8 | /// Silverlight Extension methods
9 | ///
10 | public static class SilverlightExtensions
11 | {
12 | ///
13 | /// Transforms a coordinate point.
14 | ///
15 | /// Input point
16 | /// Transformed point
17 | public static System.Windows.Point Transform(this IMathTransform transform, System.Windows.Point point)
18 | {
19 | double[] p = transform.Transform(new double[] { point.X, point.Y });
20 | if (p == null || p.Length < 2) return new System.Windows.Point(double.NaN, double.NaN);
21 | return new System.Windows.Point(p[0], p[1]);
22 | }
23 |
24 | internal static Parameter Find(this List items, Predicate match)
25 | {
26 | foreach (Parameter item in items)
27 | {
28 | if (match(item))
29 | return item;
30 | }
31 | return null;
32 | }
33 |
34 | internal static ProjectionParameter Find(this List items, Predicate match)
35 | {
36 | foreach (ProjectionParameter item in items)
37 | {
38 | if (match(item))
39 | return item;
40 | }
41 | return null;
42 | }
43 |
44 | //public static T Find(this List items, Predicate match)
45 | //{
46 | // foreach (T item in items)
47 | // {
48 | // if (match(item))
49 | // return item;
50 | // }
51 | // return default(T);
52 | //}
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/ProjNet/ProjNet.Silverlight/ProjNet.Silverlight.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | zh-CN
11 | false
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | DynamicPage
20 | True
21 | False
22 | False
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | True
32 |
33 |
34 | True
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/ProjNet/ProjNet.Silverlight/ProjNet.Silverlight.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/ProjNet.Silverlight/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Proj.Net")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Proj.Net for Silverlight")]
13 | [assembly: AssemblyCopyright("Copyright © 2009")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("c96f6d31-a6a6-4446-8b51-84c93bcecdde")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.2.*")]
35 | [assembly: AssemblyFileVersion("1.2.0.0")]
36 |
--------------------------------------------------------------------------------
/ProjNet/ProjNet.vsmdi:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 8c43106b-9dc1-4907-a29f-aa66a61bf5b6
7 |
8 | Lists of Tests
9 |
10 | True
11 |
12 | 00000000-0000-0000-0000-000000000000
13 |
14 |
15 | 23c033d5-b07f-45b0-af0c-3e9d0ea38548
16 | Local Test Run
17 | localtestrun.testrunconfig
18 | Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration
19 | True
20 |
21 |
22 |
--------------------------------------------------------------------------------
/ProjNet/ProjNetWinFormTest/Form1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Drawing;
3 | using System.Windows.Forms;
4 | using ProjNet.CoordinateSystems.Transformations;
5 | using ProjNet.CoordinateSystems;
6 | namespace ProjNetWinFormTest
7 | {
8 | public partial class FrmUTM : Form
9 | {
10 | public FrmUTM()
11 | {
12 | InitializeComponent();
13 | }
14 |
15 | private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
16 | {
17 | Point p = new Point(e.X, e.Y);
18 | double scale = (double)360 / pictureBox1.Width;
19 | Point pGeo = new Point((int)(p.X * scale - 180), (int)(90 - p.Y * scale));
20 | locationLong.Text = string.Format("{0}", pGeo.X);
21 | locationLat.Text = string.Format("{0}", pGeo.Y);
22 |
23 | //Transform to UTM
24 | //转换方法工厂
25 | CoordinateTransformationFactory ctfac = new CoordinateTransformationFactory();
26 | ICoordinateSystem wgs84geo = ProjNet.CoordinateSystems.GeographicCoordinateSystem.WGS84;
27 | int zone = (int)Math.Ceiling((double)(pGeo.X + 180) / 6);
28 | ICoordinateSystem utm = ProjNet.CoordinateSystems.ProjectedCoordinateSystem.WGS84_UTM(zone, pGeo.Y > 0);
29 | //通过转换方法工厂构建坐标转换方法
30 | ICoordinateTransformation trans = ctfac.CreateFromCoordinateSystems(wgs84geo, utm);
31 |
32 | double[] pUtm = trans.MathTransform.Transform(new double[] { pGeo.X, pGeo.Y });
33 | locationX.Text = string.Format("N{0}", pUtm[1]);
34 | locationY.Text = string.Format("E{0}", pUtm[0]);
35 | locationZone.Text = string.Format("Zone {0}{1}", zone, pGeo.Y > 0 ? 'N' : 'S');
36 | }
37 |
38 | private void Form1_Load(object sender, EventArgs e)
39 | {
40 |
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ProjNet/ProjNetWinFormTest/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace ProjNetWinFormTest
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// 应用程序的主入口点。
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new FrmUTM());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/ProjNet/ProjNetWinFormTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("ProjNetWinFormTest")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("ProjNetWinFormTest")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("40fdedd1-1c09-42b4-8153-8a8cf0fb521e")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/ProjNet/ProjNetWinFormTest/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.1
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace ProjNetWinFormTest.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ProjNet/ProjNetWinFormTest/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems.Tests/ProjNET.Tests.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | zh-CN
11 | false
12 |
13 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems.Tests/ProjNET.Tests.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | // General Information about an assembly is controlled through the following
5 | // set of attributes. Change these attribute values to modify the information
6 | // associated with an assembly.
7 | [assembly: AssemblyTitle("Unit tests for SharpMap CS")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("UnitTests")]
12 | [assembly: AssemblyCopyright("Copyright © 2007")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // Setting ComVisible to false makes the types in this assembly not visible
17 | // to COM componenets. If you need to access a type in this assembly from
18 | // COM, set the ComVisible attribute to true on that type.
19 | [assembly: ComVisible(false)]
20 |
21 | // The following GUID is for the ID of the typelib if this project is exposed to COM
22 | [assembly: Guid("af268c90-0d17-4093-98ec-2c78c30b5fd8")]
23 |
24 | // Version information for an assembly consists of the following four values:
25 | //
26 | // Major Version
27 | // Minor Version
28 | // Build Number
29 | // Revision
30 | //
31 | // You can specify all the values or you can default the Revision and Build Numbers
32 | // by using the '*' as shown below:
33 | [assembly: AssemblyVersion("0.9.0.*")]
34 | [assembly: AssemblyFileVersion("0.9.0.0")]
35 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems.Tests/SRIDReader.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.IO;
3 | using ProjNet.Converters.WellKnownText;
4 | using ProjNet.CoordinateSystems;
5 |
6 | namespace ProjNet.UnitTests
7 | {
8 | internal class SRIDReader
9 | {
10 | private const string filename = @"..\..\SRID.csv";
11 |
12 | public struct WKTstring {
13 | ///
14 | /// Well-known ID
15 | ///
16 | public int WKID;
17 | ///
18 | /// Well-known Text
19 | ///
20 | public string WKT;
21 | }
22 |
23 | ///
24 | /// Enumerates all SRID's in the SRID.csv file.
25 | ///
26 | /// Enumerator
27 | public static IEnumerable GetSRIDs()
28 | {
29 | using (StreamReader sr = File.OpenText(filename))
30 | {
31 | while (!sr.EndOfStream)
32 | {
33 | string line = sr.ReadLine();
34 | int split = line.IndexOf(';');
35 | if (split > -1)
36 | {
37 | WKTstring wkt = new WKTstring();
38 | wkt.WKID = int.Parse(line.Substring(0, split));
39 | wkt.WKT = line.Substring(split + 1);
40 | yield return wkt;
41 | }
42 | }
43 | sr.Close();
44 | }
45 | }
46 | ///
47 | /// Gets a coordinate system from the SRID.csv file
48 | ///
49 | /// EPSG ID
50 | /// Coordinate system, or null if SRID was not found.
51 | public static ICoordinateSystem GetCSbyID(int id)
52 | {
53 | CoordinateSystemFactory fac = new CoordinateSystemFactory();
54 | foreach (WKTstring wkt in GetSRIDs())
55 | {
56 | if (wkt.WKID == id)
57 | {
58 | return CoordinateSystemWktReader.Parse(wkt.WKT) as ICoordinateSystem;
59 | }
60 | }
61 | return null;
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Ellipsoid.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Ellipsoid.cs
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IAngularUnit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IAngularUnit interface defines methods on angular units.
26 | ///
27 | public interface IAngularUnit : IUnit
28 | {
29 | ///
30 | /// Gets or sets the number of radians per angular unit.
31 | ///
32 | double RadiansPerUnit { get; set; }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/ICompoundCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// An aggregate of two coordinate systems (CRS). One of these is usually a
26 | /// CRS based on a two dimensional coordinate system such as a geographic or
27 | /// a projected coordinate system with a horizontal datum. The other is a
28 | /// vertical CRS which is a one-dimensional coordinate system with a vertical
29 | /// datum.
30 | ///
31 | public interface ICompoundCoordinateSystem : ICoordinateSystem
32 | {
33 | ///
34 | /// Gets first sub-coordinate system.
35 | ///
36 | CoordinateSystem HeadCS { get; }
37 | ///
38 | /// Gets second sub-coordinate system.
39 | ///
40 | CoordinateSystem TailCS { get; }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IDatum.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A set of quantities from which other quantities are calculated.
26 | ///
27 | ///
28 | /// For the OGC abstract model, it can be defined as a set of real points on the earth
29 | /// that have coordinates. EG. A datum can be thought of as a set of parameters
30 | /// defining completely the origin and orientation of a coordinate system with respect
31 | /// to the earth. A textual description and/or a set of parameters describing the
32 | /// relationship of a coordinate system to some predefined physical locations (such
33 | /// as center of mass) and physical directions (such as axis of spin). The definition
34 | /// of the datum may also include the temporal behavior (such as the rate of change of
35 | /// the orientation of the coordinate axes).
36 | ///
37 | public interface IDatum : IInfo
38 | {
39 | ///
40 | /// Gets or sets the type of the datum as an enumerated code.
41 | ///
42 | DatumType DatumType { get; set; }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IEllipsoid.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IEllipsoid interface defines the standard information stored with ellipsoid objects.
26 | ///
27 | public interface IEllipsoid : IInfo
28 | {
29 | ///
30 | /// Gets or sets the value of the semi-major axis.
31 | ///
32 | double SemiMajorAxis { get; set; }
33 | ///
34 | /// Gets or sets the value of the semi-minor axis.
35 | ///
36 | double SemiMinorAxis { get; set; }
37 | ///
38 | /// Gets or sets the value of the inverse of the flattening constant of the ellipsoid.
39 | ///
40 | double InverseFlattening { get; set; }
41 | ///
42 | /// Gets or sets the value of the axis unit.
43 | ///
44 | ILinearUnit AxisUnit { get; set; }
45 | ///
46 | /// Is the Inverse Flattening definitive for this ellipsoid? Some ellipsoids use the
47 | /// IVF as the defining value, and calculate the polar radius whenever asked. Other
48 | /// ellipsoids use the polar radius to calculate the IVF whenever asked. This
49 | /// distinction can be important to avoid floating-point rounding errors.
50 | ///
51 | bool IsIvfDefinitive { get; set; }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IFittedCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A coordinate system which sits inside another coordinate system. The fitted
26 | /// coordinate system can be rotated and shifted, or use any other math transform
27 | /// to inject itself into the base coordinate system.
28 | ///
29 | public interface IFittedCoordinateSystem : ICoordinateSystem
30 | {
31 | ///
32 | /// Gets underlying coordinate system.
33 | ///
34 | ICoordinateSystem BaseCoordinateSystem { get; }
35 | ///
36 | /// Gets Well-Known Text of a math transform to the base coordinate system.
37 | /// The dimension of this fitted coordinate system is determined by the source
38 | /// dimension of the math transform. The transform should be one-to-one within
39 | /// this coordinate system's domain, and the base coordinate system dimension
40 | /// must be at least as big as the dimension of this coordinate system.
41 | ///
42 | ///
43 | string ToBase();
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IGeocentricCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A 3D coordinate system, with its origin at the center of the Earth.
26 | ///
27 | public interface IGeocentricCoordinateSystem : ICoordinateSystem
28 | {
29 | ///
30 | /// Returns the HorizontalDatum. The horizontal datum is used to determine where
31 | /// the centre of the Earth is considered to be. All coordinate points will be
32 | /// measured from the centre of the Earth, and not the surface.
33 | ///
34 | IHorizontalDatum HorizontalDatum { get; set; }
35 | ///
36 | /// Gets the units used along all the axes.
37 | ///
38 | ILinearUnit LinearUnit { get; set; }
39 | ///
40 | /// Returns the PrimeMeridian.
41 | ///
42 | IPrimeMeridian PrimeMeridian { get; set; }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IGeodeticSpatialReference.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IGeodeticSpatialReference interface defines a root interface for all types of geodetic
26 | /// spatial references, it is a subclass of ICoordinateSystem.
27 | ///
28 | public interface IGeodeticSpatialReference : ICoordinateSystem { }
29 | }
30 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IGeographicCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IGeographicCoordinateSystem interface is a subclass of IGeodeticSpatialReference and
26 | /// defines the standard information stored with geographic coordinate system objects.
27 | ///
28 | public interface IGeographicCoordinateSystem : IHorizontalCoordinateSystem
29 | {
30 | ///
31 | /// Gets or sets the angular units of the geographic coordinate system.
32 | ///
33 | IAngularUnit AngularUnit { get; set; }
34 | ///
35 | /// Gets or sets the prime meridian of the geographic coordinate system.
36 | ///
37 | IPrimeMeridian PrimeMeridian { get; set; }
38 | ///
39 | /// Gets the number of available conversions to WGS84 coordinates.
40 | ///
41 | int NumConversionToWGS84 { get; }
42 | ///
43 | /// Gets details on a conversion to WGS84.
44 | ///
45 | Wgs84ConversionInfo GetWgs84ConversionInfo(int index);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IHorizontalCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A 2D coordinate system suitable for positions on the Earth's surface.
26 | ///
27 | public interface IHorizontalCoordinateSystem : ICoordinateSystem
28 | {
29 | ///
30 | /// Returns the HorizontalDatum.
31 | ///
32 | IHorizontalDatum HorizontalDatum { get; set; }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IHorizontalDatum.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// Procedure used to measure positions on the surface of the Earth.
26 | ///
27 | public interface IHorizontalDatum : IDatum
28 | {
29 | ///
30 | /// Gets or sets the ellipsoid of the datum.
31 | ///
32 | IEllipsoid Ellipsoid { get; set; }
33 | ///
34 | /// Gets preferred parameters for a Bursa Wolf transformation into WGS84. The 7 returned values
35 | /// correspond to (dx,dy,dz) in meters, (ex,ey,ez) in arc-seconds, and scaling in parts-per-million.
36 | ///
37 | Wgs84ConversionInfo Wgs84Parameters { get; set; }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IInfo.cs
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/ILinearUnit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The ILinearUnit interface defines methods on linear units.
26 | ///
27 | public interface ILinearUnit : IUnit
28 | {
29 | ///
30 | /// Gets or sets the number of meters per .
31 | ///
32 | double MetersPerUnit { get; set; }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/ILocalCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A local coordinate system, with uncertain relationship to the world.
26 | ///
27 | /// In general, a local coordinate system cannot be related to other coordinate
28 | /// systems. However, if two objects supporting this interface have the same dimension,
29 | /// axes, units and datum then client code is permitted to assume that the two coordinate
30 | /// systems are identical. This allows several datasets from a common source (e.g. a CAD
31 | /// system) to be overlaid. In addition, some implementations of the Coordinate
32 | /// Transformation (CT) package may have a mechanism for correlating local datums. (E.g.
33 | /// from a database of transformations, which is created and maintained from real-world
34 | /// measurements.)
35 | ///
36 | public interface ILocalCoordinateSystem : ICoordinateSystem
37 | {
38 | ///
39 | /// Gets or sets the local datum
40 | ///
41 | ILocalDatum LocalDatum { get; set; }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/ILocalDatum.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// Local datum. If two local datum objects have the same datum type and name,
26 | /// then they can be considered equal. This means that coordinates can be
27 | /// transformed between two different local coordinate systems, as long as
28 | /// they are based on the same local datum.
29 | ///
30 | public interface ILocalDatum : IDatum
31 | {
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IParameterInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IParameterInfo interface provides an interface through which clients of a
26 | /// Projected Coordinate System or of a Projection can set the parameters of the
27 | /// projection. It provides a generic interface for discovering the names and default
28 | /// values of parameters, and for setting and getting parameter values. Subclasses of
29 | /// this interface may provide projection specific parameter access methods.
30 | ///
31 | public interface IParameterInfo
32 | {
33 | ///
34 | /// Gets the number of parameters expected.
35 | ///
36 | int NumParameters { get; }
37 | ///
38 | /// Returns the default parameters for this projection.
39 | ///
40 | ///
41 | Parameter[] DefaultParameters();
42 | ///
43 | /// Gets or sets the parameters set for this projection.
44 | ///
45 | List Parameters { get; set; }
46 | ///
47 | /// Gets the parameter by its name
48 | ///
49 | ///
50 | ///
51 | Parameter GetParameterByName(string name);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IPrimeMeridian.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IPrimeMeridian interface defines the standard information stored with prime
26 | /// meridian objects. Any prime meridian object must implement this interface as
27 | /// well as the ISpatialReferenceInfo interface.
28 | ///
29 | public interface IPrimeMeridian : IInfo
30 | {
31 | ///
32 | /// Gets or sets the longitude of the prime meridian (relative to the Greenwich prime meridian).
33 | ///
34 | double Longitude { get; set; }
35 | ///
36 | /// Gets or sets the AngularUnits.
37 | ///
38 | IAngularUnit AngularUnit { get; set; }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/ISpatialReferenceFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjNet.CoordinateSystems
6 | {
7 | public interface ISpatialReferenceFactory
8 | {
9 | IEllipsoid CreateSpheroid(int spheroidType);
10 | IHorizontalDatum CreateDatum(int datumType);
11 | IGeographicCoordinateSystem CreateGeographicCoordinateSystem(int gcsType);
12 | IProjection CreateProjection(int projectionType);
13 | IProjectedCoordinateSystem CreateProjectedCoordinateSystem(int pcsType);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IUnit.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// The IUnit interface abstracts different kinds of units, it has no methods.
26 | ///
27 | public interface IUnit : IInfo { }
28 | }
29 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IVerticalCoordinateSystem.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A one-dimensional coordinate system suitable for vertical measurements.
26 | ///
27 | public interface IVerticalCoordinateSystem : ICoordinateSystem
28 | {
29 | ///
30 | /// Gets the vertical datum, which indicates the measurement method
31 | ///
32 | IVerticalDatum VerticalDatum { get; set; }
33 | ///
34 | /// Gets the units used along the vertical axis.
35 | ///
36 | ILinearUnit VerticalUnit { get; set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/IVerticalDatum.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// Procedure used to measure vertical distances.
26 | ///
27 | public interface IVerticalDatum : IDatum
28 | {
29 |
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Info.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Info.cs
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Parameter.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems
23 | {
24 | ///
25 | /// A named parameter value.
26 | ///
27 | public class Parameter
28 | {
29 | ///
30 | /// Creates an instance of a parameter
31 | ///
32 | /// Units are always either meters or degrees.
33 | /// Name of parameter
34 | /// Value
35 | public Parameter(string name, double value)
36 | {
37 | _Name = name;
38 | _Value = value;
39 | }
40 | #region IParameter Members
41 |
42 | private string _Name;
43 |
44 | ///
45 | /// Parameter name
46 | ///
47 | public string Name
48 | {
49 | get { return _Name; }
50 | set { _Name = value; }
51 | }
52 |
53 | private double _Value;
54 |
55 | ///
56 | /// Parameter value
57 | ///
58 | public double Value
59 | {
60 | get { return _Value; }
61 | set { _Value = value; }
62 | }
63 |
64 | #endregion
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/SREnvironment/RgSRDatumType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjNet.CoordinateSystems
6 | {
7 | public enum RgSRDatumType
8 | {
9 | RgSRDatum_Beijing1954 = 6214,//Beijing 1954.
10 | RgSRDatum_WGS1984 = 6326,//WGS 1984.
11 | RgSRDatum_Xian1980 = 6610// Xian 1980.
12 | }
13 | public enum RgSRDatumType2
14 | {
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/SREnvironment/RgSRGeoCSType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjNet.CoordinateSystems
6 | {
7 | public enum RgSRGeoCSType
8 | {
9 | RgSRGeoCS_Clarke1880 = 4034,// Clarke 1880.
10 | RgSRGeoCS_Beijing1954 = 4214,//Beijing 1954.
11 | RgSRGeoCS_WGS1984 = 4326,// WGS 1984.
12 | }
13 | public enum RgSRGeoCS2Type
14 | {
15 | RgSRGeoCS_MajorAuxSphere_WGS1984 = 104199,// Major auxiliary sphere based upon WGS 1984.
16 | }
17 | public enum RgSRGeoCS3Type
18 | {
19 | RgSRGeoCS_Xian1980 = 4610 //Xian 1980.
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/SREnvironment/RgSRProjectionType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 |
5 | namespace ProjNet.CoordinateSystems
6 | {
7 | ///
8 | /// 目前支持的投影类型
9 | ///
10 | enum RgSRProjectionType
11 | {
12 | RgSRProjection_Mercator = 43004,//Mercator.
13 | RgSRProjection_GaussKruger = 43005,//Gauss-Kruger.
14 | RgSRProjection_TransverseMercator = 43006,//Transverse Mercator.
15 | RgSRProjection_Albers = 43007,//Albers.
16 | RgSRProjection_LambertConformalConic = 43020 //Lambert Conformal Conic.
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/CoordinateTransformationAuthorityFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005, 2006 - Morten Nielsen (www.iter.dk)
2 | //
3 | // This file is part of SharpMap.
4 | // SharpMap is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // SharpMap is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with SharpMap; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | namespace SharpMap.CoordinateSystems.Transformations
19 | {
20 | ///
21 | /// Creates coordinate transformation objects from codes. The codes are maintained by an external authority. A commonly used authority is EPSG, which is also used in the GeoTIFF standard
22 | ///
23 | public interface CoordinateTransformationAuthorityFactory
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/CoordinateTransformationFactory.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/CoordinateTransformationFactory.cs
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/ICoordinateTransformationAuthorityFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | namespace ProjNet.CoordinateSystems.Transformations
19 | {
20 | ///
21 | /// Creates coordinate transformation objects from codes. The codes are maintained by an external authority. A commonly used authority is EPSG, which is also used in the GeoTIFF standard
22 | ///
23 | public interface ICoordinateTransformationAuthorityFactory
24 | {
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/ICoordinateTransformationFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems.Transformations
23 | {
24 | ///
25 | /// Creates coordinate transformations.
26 | ///
27 | public interface ICoordinateTransformationFactory
28 | {
29 | ///
30 | /// Creates a transformation between two coordinate systems.
31 | ///
32 | ///
33 | /// This method will examine the coordinate systems in order to construct
34 | /// a transformation between them. This method may fail if no path between
35 | /// the coordinate systems is found, using the normal failing behavior of
36 | /// the DCP (e.g. throwing an exception).
37 | /// Source coordinate system
38 | /// Target coordinate system
39 | ///
40 | ICoordinateTransformation CreateFromCoordinateSystems(ICoordinateSystem sourceCS, ICoordinateSystem targetCS);
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/Transformations/TransformType.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005 - 2009 - Morten Nielsen (www.sharpgis.net)
2 | //
3 | // This file is part of ProjNet.
4 | // ProjNet is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // ProjNet is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with ProjNet; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | using System;
19 | using System.Collections.Generic;
20 | using System.Text;
21 |
22 | namespace ProjNet.CoordinateSystems.Transformations
23 | {
24 | ///
25 | /// Semantic type of transform used in coordinate transformation.
26 | ///
27 | public enum TransformType : int
28 | {
29 | ///
30 | /// Unknown or unspecified type of transform.
31 | ///
32 | Other = 0,
33 | ///
34 | /// Transform depends only on defined parameters. For example, a cartographic projection.
35 | ///
36 | Conversion = 1,
37 | ///
38 | /// Transform depends only on empirically derived parameters. For example a datum transformation.
39 | ///
40 | Transformation = 2,
41 | ///
42 | /// Transform depends on both defined and empirical parameters.
43 | ///
44 | ConversionAndTransformation = 3
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/WGS84ConversionInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/CoordinateSystems/WGS84ConversionInfo.cs
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/ProjNET.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | zh-CN
11 | false
12 | ShowAllFiles
13 |
14 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/ProjNET.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.InteropServices;
3 |
4 | [assembly: AssemblyTitle("Proj.NET")]
5 | [assembly: AssemblyDescription("")]
6 | [assembly: AssemblyConfiguration("")]
7 | [assembly: AssemblyCompany("")]
8 | [assembly: AssemblyProduct("Proj.NET")]
9 | [assembly: AssemblyCopyright("Copyright ?2009")]
10 | [assembly: AssemblyTrademark("")]
11 | [assembly: AssemblyCulture("")]
12 | [assembly: System.CLSCompliant(true)]
13 | [assembly: ComVisible(false)]
14 | [assembly: Guid("e16f3ac5-214b-4ef3-9809-740a13cf0ec7")]
15 | [assembly: AssemblyVersion("1.2.*")]
16 | [assembly: AssemblyFileVersion("1.2.0.0")]
17 |
--------------------------------------------------------------------------------
/ProjNet/SharpMap.CoordinateSystems/scskey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/ProjNet/SharpMap.CoordinateSystems/scskey.snk
--------------------------------------------------------------------------------
/ProjNet/UnitTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Unit tests for SharpMap CS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UnitTests")]
13 | [assembly: AssemblyCopyright("Copyright © 2007")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM componenets. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("af268c90-0d17-4093-98ec-2c78c30b5fd8")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/ProjNet/UnitTests/UnitTests.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/ProjNet/localtestrun.testrunconfig:
--------------------------------------------------------------------------------
1 |
2 |
3 | This is a default test run configuration for a local test run.
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | RGEOS
2 | =====
3 |
4 | GIS常用算法,希望提供基本空间几何对象定义、空间量算、空间拓扑操作、空间拓扑关系和空间分析算法的搜集和整理,
5 | 同时提供一个几何图形绘制功能用来显示相关算法的结果。
6 |
--------------------------------------------------------------------------------
/RGeos-Logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos-Logo.png
--------------------------------------------------------------------------------
/RGeos.Carto/ILayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Display;
6 |
7 | namespace RGeos.Carto
8 | {
9 | public interface ILayer
10 | {
11 | string Name { get; set; }
12 | string AliasName { get; set; }
13 | bool Visible { get; set; }
14 | void Draw(IScreenDisplay display);
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/RGeos.Carto/IMap.cs:
--------------------------------------------------------------------------------
1 | using RGeos.Display;
2 | using RGeos.Core;
3 |
4 | namespace RGeos.Carto
5 | {
6 | public interface IMap
7 | {
8 | ILayer CurrentLayer { get; set; }
9 | void AddLayer(ILayer layer);
10 | void RemoveLayer(ILayer layer);
11 | void Draw(IScreenDisplay display);
12 | RgeosUnits Units { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/RGeos.Carto/ISelection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Carto
7 | {
8 | public interface ISelection
9 | {
10 | List SelectedFeatures { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/RGeos.Carto/ISnapPoint.cs:
--------------------------------------------------------------------------------
1 | using RGeos.Geometries;
2 | using System.Drawing;
3 | using RGeos.Display;
4 |
5 | namespace RGeos.Carto
6 | {
7 | public interface ISnapPoint
8 | {
9 | IGeometry Owner { get; }
10 | RgPoint SnapPoint { get; }
11 |
12 | void Draw(IScreenDisplay display);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/RGeos.Carto/Layer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Display;
6 | using RGeos.Geometries;
7 | using System.Drawing;
8 |
9 | namespace RGeos.Carto
10 | {
11 | public abstract class Layer : ILayer
12 | {
13 | public string Name { get; set; }
14 | public string AliasName { get; set; }
15 | private bool mVisible = true;
16 |
17 | public bool Visible
18 | {
19 | get { return mVisible; }
20 | set { mVisible = value; }
21 | }
22 | private BoundingBox mEnvelope;
23 | public virtual BoundingBox Envelope
24 | {
25 | get { return mEnvelope; }
26 | }
27 | public virtual void Draw(IScreenDisplay display)
28 | {
29 | }
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/RGeos.Carto/MapSelection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Carto
7 | {
8 | public class MapSelection : ISelection
9 | {
10 | private List mSelectedFeatures;
11 |
12 | public List SelectedFeatures
13 | {
14 | get { return mSelectedFeatures; }
15 | set { mSelectedFeatures = value; }
16 | }
17 | public MapSelection()
18 | {
19 | mSelectedFeatures = new List();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RGeos.Carto/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Carto")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("xike")]
12 | [assembly: AssemblyProduct("RGeos.Carto")]
13 | [assembly: AssemblyCopyright("Copyright © xike 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("f62ca351-28f4-42ca-877e-38ec34dba506")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Carto/RasterLayer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Carto/RasterLayer.cs
--------------------------------------------------------------------------------
/RGeos.Carto/RgEnumShapeType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Carto
7 | {
8 | public enum RgEnumShapeType
9 | {
10 | RgPoint = 0,
11 | RgLineString = 1,
12 | RgMultiLineString = 2,
13 | RgPolygon = 3,
14 | RgMultiPolygon = 4
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RGeos.Carto/SnapPointBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Geometries;
6 | using RGeos.Display;
7 | using System.Drawing;
8 |
9 | namespace RGeos.Carto
10 | {
11 | ///
12 | /// 捕捉点抽象类
13 | ///
14 | class SnapPointBase : ISnapPoint
15 | {
16 | protected RgPoint m_snappoint;
17 |
18 | protected IGeometry m_owner;
19 | public IGeometry Owner
20 | {
21 | get { return m_owner; }
22 | }
23 | public SnapPointBase(IGeometry owner, RgPoint snappoint)
24 | {
25 | m_owner = owner;
26 | m_snappoint = snappoint;
27 |
28 | }
29 | #region ISnapPoint Members
30 | public virtual RgPoint SnapPoint
31 | {
32 | get { return m_snappoint; }
33 | }
34 |
35 | public virtual void Draw(IScreenDisplay canvas)
36 | {
37 | DrawPoint(canvas, Pens.Gold, null);
38 | }
39 | #endregion
40 |
41 | protected void DrawPoint(IScreenDisplay canvas, Pen pen, Brush fillBrush)
42 | {
43 | IScreenDisplayDraw canvasDraw = canvas as IScreenDisplayDraw;
44 | Graphics dc = Graphics.FromHwnd(canvas.Handle);
45 |
46 | PointF m_point1 = canvas.DisplayTransformation.ToScreen(m_snappoint);
47 | dc.DrawRectangle(pen, m_point1.X - 3, m_point1.Y - 3, 6, 6);
48 | Rectangle screenrect = new Rectangle((int)m_point1.X - 3, (int)m_point1.Y - 3, 6, 6);
49 | screenrect.X++;
50 | screenrect.Y++;
51 | screenrect.Width--;
52 | screenrect.Height--;
53 | if (fillBrush != null)
54 | dc.FillRectangle(fillBrush, screenrect);
55 | dc.Dispose();
56 | dc = null;
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/RGeos.Controls/IGraphicContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Controls
7 | {
8 | public interface IGraphicContainer
9 | {
10 |
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/RGeos.Controls/IMapControl2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Display;
6 | using RGeos.Core;
7 |
8 | namespace RGeos.Controls
9 | {
10 | public interface IMapControl2 : IMapControl
11 | {
12 | RGeos.Carto.IMap Map { get; }
13 | IScreenDisplay ScreenDisplay { get; }
14 | void Refresh();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RGeos.Controls/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Controls")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("xike")]
12 | [assembly: AssemblyProduct("RGeos.Controls")]
13 | [assembly: AssemblyCopyright("Copyright © xike 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("27162886-df8f-4b80-b286-079cfb4fe994")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Controls/RgMapControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Controls
2 | {
3 | partial class RgMapControl
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.SuspendLayout();
32 | //
33 | // RgMapControl
34 | //
35 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
36 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
37 | this.Name = "RgMapControl";
38 | this.Size = new System.Drawing.Size(347, 221);
39 | this.ResumeLayout(false);
40 |
41 | }
42 |
43 | #endregion
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/RGeos.Controls/RgTocControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Controls
2 | {
3 | partial class RgTocControl
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.treeView1 = new System.Windows.Forms.TreeView();
32 | this.SuspendLayout();
33 | //
34 | // treeView1
35 | //
36 | this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill;
37 | this.treeView1.Location = new System.Drawing.Point(0, 0);
38 | this.treeView1.Name = "treeView1";
39 | this.treeView1.Size = new System.Drawing.Size(151, 359);
40 | this.treeView1.TabIndex = 0;
41 | //
42 | // RgTocControl
43 | //
44 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
45 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
46 | this.Controls.Add(this.treeView1);
47 | this.Name = "RgTocControl";
48 | this.Size = new System.Drawing.Size(151, 359);
49 | this.ResumeLayout(false);
50 |
51 | }
52 |
53 | #endregion
54 |
55 | private System.Windows.Forms.TreeView treeView1;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/RGeos.Controls/RgTocControl.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Drawing;
5 | using System.Data;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace RGeos.Controls
11 | {
12 | public partial class RgTocControl : UserControl
13 | {
14 | public RgTocControl()
15 | {
16 | InitializeComponent();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/RGeos.Core/HookHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core
7 | {
8 | public class HookHelper
9 | {
10 | public static HookHelper Hook;
11 | public static HookHelper Instance()
12 | {
13 | if (Hook==null)
14 | {
15 | Hook = new HookHelper();
16 | }
17 | return Hook;
18 | }
19 | private HookHelper()
20 | {
21 | }
22 | public IMapControl MapControl;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/RGeos.Core/ICommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core
7 | {
8 | public interface ICommand
9 | {
10 | string Name { get; set; }
11 | void OnCreate(HookHelper hook);
12 | void OnClick();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/RGeos.Core/IMapControl.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace RGeos.Core
3 | {
4 | public interface IMapControl
5 | {
6 | ITool CurrentTool { get; set; }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/RGeos.Core/ITool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace RGeos.Core
8 | {
9 | public interface ITool : ICommand
10 | {
11 | void OnMouseMove(int x, int y);
12 | void OnMouseDown(int x, int y, MouseEventArgs e);
13 | void OnMouseUp(int x, int y);
14 | void OnKeyUp(KeyEventArgs e);
15 | void OnKeyDown(KeyEventArgs e);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/RGeos.Core/ITransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core
7 | {
8 | public interface ITransformation
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Core")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("xike")]
12 | [assembly: AssemblyProduct("RGeos.Core")]
13 | [assembly: AssemblyCopyright("Copyright © xike 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("3368a046-e45b-430c-81de-35e939e34456")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Core/RBaseCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace RGeos.Core
8 | {
9 | public abstract class RBaseCommand : ITool
10 | {
11 | public abstract string Name { get; set; }
12 |
13 | public abstract void OnCreate(HookHelper hook);
14 |
15 | public abstract void OnClick();
16 |
17 | public abstract void OnMouseMove(int x, int y);
18 |
19 | // public abstract void OnMouseDown(int x, int y);
20 | public abstract void OnMouseDown(int x, int y, MouseEventArgs e);
21 |
22 | public abstract void OnMouseUp(int x, int y);
23 |
24 | public virtual void OnKeyUp(KeyEventArgs e)
25 | {
26 | }
27 |
28 | public virtual void OnKeyDown(KeyEventArgs e)
29 | {
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/RGeos.Core/RgeosUnits.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core
7 | {
8 | public enum RgeosUnits
9 | {
10 | RgUnknownUnits = 0,// Unknown.
11 | RgInches = 1,//Inches.
12 | RgPoints = 2,// Points.
13 | RgFeet = 3, //Feet.
14 | RgYards = 4,// Yards.
15 | RgMiles = 5,//Miles.
16 | RgNauticalMiles = 6, //Nautical miles.
17 | RgMillimeters = 7,// Millimeters.
18 | RgCentimeters = 8, //Centimeters.
19 | RgMeters = 9,//Meters.
20 | RgKilometers = 10,// Kilometers.
21 | RgDecimalDegrees = 11,// Decimal degrees.
22 | RgDecimeters = 12,// Decimeters.
23 | RgUnitsLast = 13
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ControlCommands/DrawPointTool.cs:
--------------------------------------------------------------------------------
1 | using RGeos.Controls;
2 | using RGeos.Display;
3 | using RgPoint = RGeos.Geometries.RgPoint;
4 | using RGeos.Carto;
5 | using RGeos.Core;
6 |
7 | namespace RGeos.Plugins
8 | {
9 | class DrawPointTool : RBaseCommand
10 | {
11 | private string mName = string.Empty;
12 | public override string Name
13 | {
14 | get
15 | {
16 | return mName;
17 | }
18 | set
19 | {
20 | mName = value;
21 | }
22 | }
23 | RgMapControl mMapCtrl = null;
24 | public IDisplayFeedback DrawPhase = null;
25 | IScreenDisplay mScreenDisplay = null;
26 | public override void OnCreate(HookHelper hook)
27 | {
28 | Name = "绘制点";
29 | mMapCtrl = hook.MapControl as RgMapControl;
30 | mScreenDisplay = mMapCtrl.ScreenDisplay;
31 | }
32 |
33 | public override void OnClick()
34 | {
35 |
36 | }
37 |
38 | public override void OnMouseMove(int x, int y)
39 | {
40 |
41 | }
42 |
43 | public override void OnMouseDown(int x, int y, System.Windows.Forms.MouseEventArgs e)
44 | {
45 | RgPoint P1 = mScreenDisplay.DisplayTransformation.ToUnit(new System.Drawing.PointF(x, y));
46 | Carto.FetureLayer featurelyr = mMapCtrl.Map.CurrentLayer as Carto.FetureLayer;
47 | if (featurelyr != null && featurelyr.ShapeType == RgEnumShapeType.RgPoint)
48 | {
49 | featurelyr.AddFeature(P1);
50 | }
51 | mMapCtrl.Refresh();
52 | }
53 |
54 | public override void OnMouseUp(int x, int y)
55 | {
56 |
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ControlCommands/IPickUpPoint.cs:
--------------------------------------------------------------------------------
1 | using RGeos.Geometries;
2 |
3 | namespace RGeos.Desktop.ControlCommands
4 | {
5 | public interface IPickUpPoint
6 | {
7 | RgPoint Point { get; set; }
8 | event PickUpFinished PickUpFinishedEventHandler;
9 | }
10 | public delegate void PickUpFinished(RgPoint p1);
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ControlCommands/PanTool.cs:
--------------------------------------------------------------------------------
1 | using System.Windows.Forms;
2 | using System.Drawing;
3 | using RGeos.Controls;
4 | using RGeos.Core;
5 | using RGeos.Display;
6 | namespace RGeos.Plugins
7 | {
8 | public class PanTool : RBaseCommand
9 | {
10 | Cursor mCursor = null;
11 | RgMapControl mMapCtrl = null;
12 | public IDisplayFeedback DrawPhase = null;
13 | public override string Name { get; set; }
14 | public override void OnCreate(HookHelper hook)
15 | {
16 | Name = "漫游";
17 | mMapCtrl = hook.MapControl as RgMapControl;
18 | mScreenDisplay = mMapCtrl.ScreenDisplay;
19 | }
20 | RGeos.Display.IScreenDisplay mScreenDisplay = null;
21 |
22 | public override void OnClick()
23 | {
24 | mCursor = mMapCtrl.Cursor;
25 | }
26 | public override void OnMouseMove(int x, int y)
27 | {
28 | mScreenDisplay.PanMoveTo(new PointF(x, y));
29 | mMapCtrl.Refresh();
30 | }
31 |
32 | public override void OnMouseDown(int x, int y, MouseEventArgs e)
33 | {
34 | mScreenDisplay.PanStart(new PointF(x, y));
35 | mMapCtrl.Cursor = Cursors.Hand;
36 | }
37 | public override void OnMouseUp(int x, int y)
38 | {
39 | mScreenDisplay.PanStop();
40 | mMapCtrl.Refresh();
41 | mMapCtrl.Cursor = mCursor;
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ControlCommands/UnSelectCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Core;
6 | using RGeos.Controls;
7 | using RGeos.Carto;
8 |
9 | namespace RGeos.Plugins
10 | {
11 | public class UnSelectCommand : RBaseCommand
12 | {
13 | public override string Name { get; set; }
14 | private RgMapControl mMapCtrl = null;
15 | public override void OnCreate(HookHelper hook)
16 | {
17 | Name = "取消选择";
18 | mMapCtrl = hook.MapControl as RgMapControl;
19 | }
20 |
21 | public override void OnClick()
22 | {
23 | IMap mMap = mMapCtrl.Map;
24 | ISelection mSelection = (mMap as Map).Selection;
25 | if (mSelection == null)
26 | {
27 | return;
28 | }
29 | for (int i = 0; i < mSelection.SelectedFeatures.Count; i++)
30 | {
31 | Feature feat = mSelection.SelectedFeatures[i];
32 | feat.IsSelected = false;
33 | }
34 | mMapCtrl.Refresh();
35 | }
36 |
37 | public override void OnMouseMove(int x, int y)
38 | {
39 |
40 | }
41 |
42 | public override void OnMouseDown(int x, int y, System.Windows.Forms.MouseEventArgs e)
43 | {
44 |
45 | }
46 |
47 | public override void OnMouseUp(int x, int y)
48 | {
49 |
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/RGeos.Desktop/Earth.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Desktop/Earth.ico
--------------------------------------------------------------------------------
/RGeos.Desktop/FrmAbout.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace RGeos.Desktop
11 | {
12 | public partial class FrmAbout : Form
13 | {
14 | public FrmAbout()
15 | {
16 | InitializeComponent();
17 | }
18 |
19 | private void btnClose_Click(object sender, EventArgs e)
20 | {
21 | this.Close();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/RGeos.Desktop/FrmImportXY.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 |
10 | namespace RGeos.Desktop
11 | {
12 | public partial class FrmImportXY : Form
13 | {
14 | public FrmImportXY()
15 | {
16 | InitializeComponent();
17 | }
18 | List formats = null;
19 | private void FrmImportXY_Load(object sender, EventArgs e)
20 | {
21 | txtFormat.Enabled = false;
22 | RgFileFormat format1 = new RgFileFormat("格式一(*.txt)", "ID,X,Y");
23 | RgFileFormat format2 = new RgFileFormat("格式二(*.txt)", "ID,X,Y,Z");
24 | formats = new List();
25 | formats.Add(format1);
26 | formats.Add(format2);
27 | for (int i = 0; i < formats.Count; i++)
28 | {
29 | RgFileFormat format0 = formats[i];
30 | listFormatName.Items.Add(format0.Name);
31 | }
32 | }
33 |
34 | private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
35 | {
36 | if (listFormatName.SelectedIndex > -1)
37 | {
38 | txtFormat.Text = string.Format("格式字符串:{0}", formats[listFormatName.SelectedIndex].FormatString);
39 | }
40 |
41 | }
42 |
43 |
44 | private void btnOK_Click(object sender, EventArgs e)
45 | {
46 |
47 | }
48 |
49 | private void btnClose_Click(object sender, EventArgs e)
50 | {
51 | this.Close();
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/RGeos.Desktop/IRgFileFormat.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace RGeos.Desktop
3 | {
4 | interface IRgFileFormat
5 | {
6 | void ReadFile();
7 | }
8 | //策略模式读取文件
9 | public class RgFileFormat : IRgFileFormat
10 | {
11 | public string Name;
12 | public string FormatString;
13 | public RgFileFormat()
14 | {
15 | }
16 | public RgFileFormat(string aName, string aFormatString)
17 | {
18 | Name = aName;
19 | FormatString = aFormatString;
20 | }
21 | public virtual void ReadFile()
22 | {
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RGeos.Desktop/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace RGeos.Desktop
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// 应用程序的主入口点。
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new MainFrm());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RGeos.Desktop/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Desktop")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("RGeos.Desktop")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("00b3ad35-b441-445b-825a-bc692ca09c75")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Desktop/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.1
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace RGeos.Desktop.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RGeos.Desktop/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RGeos.Desktop/RGeos.Desktop.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ShowAllFiles
5 |
6 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ToolBox/ExcelPointPair.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Data;
6 |
7 | namespace AppSurveryTools.SevenParams
8 | {
9 | public class ExcelPointPair : IPointPairDAL
10 | {
11 | public PointPair Fetch(DataRow dr)
12 | {
13 | PointPair comm = new PointPair();
14 | object obj = dr[0];
15 | comm.ID = Convert.IsDBNull(obj) ? string.Empty : Convert.ToString(obj);
16 | obj = dr[1];
17 | string x1 = Convert.IsDBNull(obj) ? string.Empty : Convert.ToString(obj);
18 | comm.X1 = new Angle(x1).Degree;
19 | obj = dr[2];
20 | string y1 = Convert.IsDBNull(obj) ? string.Empty : Convert.ToString(obj);
21 | comm.Y1 = new Angle(y1).Degree;
22 | obj = dr[3];
23 | comm.Z1 = Convert.IsDBNull(obj) ? 0 : Convert.ToDouble(obj);
24 | obj = dr[4];
25 |
26 | obj = dr[5];
27 | comm.X2 = Convert.IsDBNull(obj) ? 0 : Convert.ToDouble(obj);
28 | obj = dr[6];
29 | comm.Y2 = Convert.IsDBNull(obj) ? 0 : Convert.ToDouble(obj);
30 | obj = dr[7];
31 | comm.Z2 = Convert.IsDBNull(obj) ? 0 : Convert.ToDouble(obj);
32 | return comm;
33 | }
34 |
35 | public void Insert()
36 | {
37 | throw new NotImplementedException();
38 | }
39 |
40 | public void Update()
41 | {
42 | throw new NotImplementedException();
43 | }
44 |
45 | public void Detele()
46 | {
47 | throw new NotImplementedException();
48 | }
49 | public List GetAllRecord()
50 | {
51 | return null;
52 | }
53 | public List GetAllRecord(DataTable dt)
54 | {
55 | List pts = new List();
56 | for (int i = 0; i < dt.Rows.Count; i++)
57 | {
58 | PointPair pt = Fetch(dt.Rows[i]);
59 | pts.Add(pt);
60 | }
61 | return pts;
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ToolBox/IPointPairDAL.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Data;
6 |
7 | namespace AppSurveryTools.SevenParams
8 | {
9 | public interface IPointPairDAL
10 | {
11 | PointPair Fetch(DataRow dr);
12 | void Insert();
13 | void Update();
14 | void Detele();
15 | List GetAllRecord();
16 | List GetAllRecord(DataTable dt);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ToolBox/Radian.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AppSurveryTools
7 | {
8 | //弧度类
9 | public class Radian
10 | {
11 | double rad;
12 |
13 | public Radian()
14 | {
15 | }
16 | public Radian(double r)
17 | {
18 | // TODO: Complete member initialization
19 | this.rad = r;
20 | }
21 | public Radian(Radian radian)
22 | {
23 | // TODO: Complete member initialization
24 | this.rad = radian.Rad;
25 | }
26 | public double Rad
27 | {
28 | get { return rad; }
29 | set { rad = value; }
30 | }
31 | public Angle ToAngle()
32 | {
33 | Angle angle = new Angle();
34 | angle.Degree = SurveryMath.Rad2Degree(rad);
35 | return angle;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ToolBox/RgPointPair.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AppSurveryTools.SevenParams
7 | {
8 | public class PointPair
9 | {
10 | //点号
11 | public string ID { get; set; }
12 |
13 | public double X1 { get; set; }
14 |
15 | public double Y1 { get; set; }
16 |
17 | public double Z1 { get; set; }
18 |
19 | public double X2 { get; set; }
20 |
21 | public double Y2 { get; set; }
22 |
23 | public double Z2 { get; set; }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/RGeos.Desktop/ToolBox/SurveryMath.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace AppSurveryTools
7 | {
8 | class SurveryMath
9 | {
10 | ///
11 | /// 将角度转换为度分秒
12 | ///
13 | /// double
14 | /// string
15 | public static string Degree2Ddmmss(double degree)
16 | {
17 | string ddmmss = string.Empty;
18 | int dd=(int)degree;
19 | int mm=(int)((degree-dd)*60);
20 | int ss = (int)(((degree - dd) * 60 - mm) * 60);
21 | if (true)
22 | {
23 |
24 | }
25 | ddmmss = string.Format("{0}°{1}'{2}\"",dd,mm,ss);
26 | return ddmmss;
27 | }
28 | ///
29 | /// 度分秒转换到角度
30 | ///
31 | ///
32 | ///
33 | ///
34 | ///
35 | public static double Ddmmss2Degree(int dd, int mm, int ss)
36 | {
37 | double degree = 0;
38 | double m = (double)mm / 60;
39 | double s = (double)ss / 3600;
40 | degree = dd + m + s;
41 | return degree;
42 | }
43 | //角度转换成弧度
44 | public static double Degree2Rad(double degree)
45 | {
46 | double rad = 0;
47 | rad = degree / 180 * Math.PI;
48 | return rad;
49 | }
50 | //角度转换成弧度
51 | public static double Rad2Degree(double rad)
52 | {
53 | double degree = 0;
54 | degree = rad * 180 / Math.PI;
55 | return degree;
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/RGeos.Desktop/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/RGeos.Desktop/frmNewFeatureClass.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Data;
5 | using System.Drawing;
6 | using System.Linq;
7 | using System.Text;
8 | using System.Windows.Forms;
9 | using RGeos.Carto;
10 |
11 | namespace RGeos.Desktop
12 | {
13 | public partial class FrmNewFeatureClass : Form
14 | {
15 | public FrmNewFeatureClass()
16 | {
17 | InitializeComponent();
18 | this.cmbShapeType.Items.Add("Point");
19 | this.cmbShapeType.Items.Add("Polyline");
20 | this.cmbShapeType.Items.Add("Polygon");
21 | this.cmbShapeType.SelectedIndex = 0;
22 | }
23 | string strFeatureName;
24 |
25 | public string FeatureName
26 | {
27 | get { return strFeatureName; }
28 | set { strFeatureName = value; }
29 | }
30 | RgEnumShapeType mShapeType;
31 |
32 | public RgEnumShapeType ShapeType
33 | {
34 | get { return mShapeType; }
35 | set { mShapeType = value; }
36 | }
37 | private void btnOK_Click(object sender, EventArgs e)
38 | {
39 | strFeatureName = this.txtLayerName.Text.Trim();
40 | if (strFeatureName.Trim()==string.Empty)
41 | {
42 | MessageBox.Show("图层名称不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
43 | return;
44 | }
45 | int idx = cmbShapeType.SelectedIndex;
46 | if (idx == 0)
47 | {
48 | mShapeType = RgEnumShapeType.RgPoint;
49 | }
50 | else if (idx == 1)
51 | {
52 | mShapeType = RgEnumShapeType.RgLineString;
53 | }
54 | else if (idx == 2)
55 | {
56 | mShapeType = RgEnumShapeType.RgPolygon;
57 | }
58 | this.DialogResult = DialogResult.OK;
59 | }
60 |
61 | private void btnCancel_Click(object sender, EventArgs e)
62 | {
63 | this.DialogResult = DialogResult.Cancel;
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/RGeos.Desktop/tradi.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Desktop/tradi.ico
--------------------------------------------------------------------------------
/RGeos.Display/IDisplayFeedback.cs:
--------------------------------------------------------------------------------
1 | using System.Drawing;
2 |
3 | namespace RGeos.Display
4 | {
5 | public interface IDisplayFeedback
6 | {
7 | IScreenDisplay Display { set; }// The display the feedback object will use.
8 | void MoveTo(Point pt);//Move to the new point.
9 | void Refresh(Graphics gc);// Call this after a refresh to show feedback again.
10 | double width { get; set; }
11 | Color color { get; set; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RGeos.Display/ISymbol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Geometries;
6 | using RGeos.Core;
7 |
8 | namespace RGeos.Display
9 | {
10 | public interface ISymbol
11 | {
12 | void Draw(IGeometry Geometry);
13 | void QueryBoundary(int hDC, ITransformation displayTransform, IGeometry Geometry, Polygon boundary);
14 | void ResetDC();
15 | RgRasterOpCode ROP2 { get; set; }
16 | void SetupDC(int hDC, ITransformation Transformation);
17 | }
18 | ///
19 | /// Binary Raster op-codes for symbol drawing.
20 | ///
21 | public enum RgRasterOpCode
22 | {
23 | RgROPBlack = 1,//Pixel is always 0.
24 | RgROPNotMergePen = 2, //Pixel is the inverse of the RgROPMergePen color.
25 | RgROPMaskNotPen = 3, //Pixel is a combination of the colors common to both the screen and the inverse of the pen.
26 | RgROPNotCopyPen = 4, //Pixel is the inverse of the pen color.
27 | RgROPMaskPenNot = 5, //Pixel is a combination of the colors common to both the pen and the inverse of the screen.
28 | RgROPNot = 6,//Pixel is the inverse of the screen color.
29 | RgROPXOrPen = 7,//Pixel is a combination of the colors in the pen and in the screen, but not in both.
30 | RgROPNotMaskPen = 8, //Pixel is the inverse of the RgROPMaskPen color.
31 | RgROPMaskPen = 9,//Pixel is a combination of the colors common to both the pen and the screen.
32 | RgROPNotXOrPen = 10,//Pixel is the inverse of the RgROPXOrPen color.
33 | RgROPNOP = 11,//Pixel remains unchanged.
34 | RgROPMergeNotPen = 12, //Pixel is a combination of the screen color and the inverse of the pen color.
35 | RgROPCopyPen = 13, //Pixel is the pen color.
36 | RgROPMergePenNot = 14,//Pixel is a combination of the pen color and the inverse of the screen color.
37 | RgROPMergePen = 15,// Pixel is a combination of the pen color and the screen color.
38 | RgROPWhite = 16
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/RGeos.Display/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Display")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("xike")]
12 | [assembly: AssemblyProduct("RGeos.Display")]
13 | [assembly: AssemblyCopyright("Copyright © xike 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("6c517107-b824-41f0-87e0-4e053677e39c")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Display/SimpleMarkerSymbol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Display
7 | {
8 | public class SimpleMarkerSymbol : ISymbol
9 | {
10 | public void Draw(Geometries.IGeometry Geometry)
11 | {
12 | throw new NotImplementedException();
13 | }
14 |
15 | public void QueryBoundary(int hDC, Core.ITransformation displayTransform, Geometries.IGeometry Geometry, Geometries.Polygon boundary)
16 | {
17 | throw new NotImplementedException();
18 | }
19 |
20 | public void ResetDC()
21 | {
22 | throw new NotImplementedException();
23 | }
24 |
25 | public RgRasterOpCode ROP2
26 | {
27 | get
28 | {
29 | throw new NotImplementedException();
30 | }
31 | set
32 | {
33 | throw new NotImplementedException();
34 | }
35 | }
36 |
37 | public void SetupDC(int hDC, Core.ITransformation Transformation)
38 | {
39 | throw new NotImplementedException();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/RGeos.Geometries/Basic/MathEx.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Basic/MathEx.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/Converters/WellKnownBinary/WKBByteOrder.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Converters.WellKnownBinary
2 | {
3 | ///
4 | /// Specifies the specific binary encoding (NDR or XDR) used for a geometry byte stream
5 | ///
6 | public enum WkbByteOrder : byte
7 | {
8 | ///
9 | /// XDR (Big Endian) Encoding of Numeric Types
10 | ///
11 | ///
12 | /// The XDR representation of an Unsigned Integer is Big Endian (most significant byte first).
13 | /// The XDR representation of a Double is Big Endian (sign bit is first byte).
14 | ///
15 | Xdr = 0,
16 | ///
17 | /// NDR (Little Endian) Encoding of Numeric Types
18 | ///
19 | ///
20 | /// The NDR representation of an Unsigned Integer is Little Endian (least significant byte first).
21 | /// The NDR representation of a Double is Little Endian (sign bit is last byte).
22 | ///
23 | Ndr = 1
24 | }
25 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Converters/WellKnownBinary/WKBGeometryType.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Converters.WellKnownBinary
2 | {
3 | ///
4 | /// Enumeration to determine geometrytype in Well-known Binary
5 | ///
6 | internal enum WKBGeometryType : uint
7 | {
8 | wkbPoint = 1,
9 | wkbLineString = 2,
10 | wkbPolygon = 3,
11 | wkbMultiPoint = 4,
12 | wkbMultiLineString = 5,
13 | wkbMultiPolygon = 6,
14 | wkbGeometryCollection = 7
15 | }
16 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Converters/WellKnownText/SpatialReference.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Reflection;
3 | using System.Xml;
4 |
5 | namespace RGeos.Converters.WellKnownText
6 | {
7 | ///
8 | /// Converts spatial reference IDs to a Well-Known Text representation.
9 | ///
10 | public class SpatialReference
11 | {
12 | ///
13 | /// Converts a Spatial Reference ID to a Well-known Text representation
14 | ///
15 | /// Spatial Reference ID
16 | /// Well-known text
17 | public static string SridToWkt(int srid)
18 | {
19 | XmlDocument xmldoc = new XmlDocument();
20 |
21 | string file = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase) + "\\SpatialRefSys.xml";
22 | //if (!System.IO.File.Exists(file))
23 | // throw new ApplicationException("Spatial reference system database not found: " + file);
24 | xmldoc.Load(file);
25 | //xmldoc.Load(System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("RGeos.SpatialReference.SpatialRefSys.xml"));
26 | XmlNode node =
27 | xmldoc.DocumentElement.SelectSingleNode("/SpatialReference/ReferenceSystem[SRID='" + srid + "']");
28 | if (node != null)
29 | return node.LastChild.InnerText;
30 | else
31 | return "";
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Converters/WellKnownText/TokenType.cs:
--------------------------------------------------------------------------------
1 | #region Using
2 |
3 |
4 |
5 | #endregion
6 |
7 | namespace RGeos.Converters.WellKnownText
8 | {
9 | ///
10 | /// Represents the type of token created by the StreamTokenizer class.
11 | ///
12 | internal enum TokenType
13 | {
14 | ///
15 | /// Indicates that the token is a word.
16 | ///
17 | Word,
18 | ///
19 | /// Indicates that the token is a number.
20 | ///
21 | Number,
22 | ///
23 | /// Indicates that the end of line has been read. The field can only have this value if the eolIsSignificant method has been called with the argument true.
24 | ///
25 | Eol,
26 | ///
27 | /// Indicates that the end of the input stream has been reached.
28 | ///
29 | Eof,
30 | ///
31 | /// Indictaes that the token is white space (space, tab, newline).
32 | ///
33 | Whitespace,
34 | ///
35 | /// Characters that are not whitespace, numbers, etc...
36 | ///
37 | Symbol
38 | }
39 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Curve.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Geometries
2 | {
3 | ///
4 | /// A Curve is a one-dimensional geometric object usually stored as a sequence of points,
5 | /// with the subtype of Curve specifying the form of the interpolation between points.
6 | ///
7 | public abstract class Curve : Geometry
8 | {
9 | ///
10 | /// The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.
11 | ///
12 | public override int Dimension
13 | {
14 | get { return 1; }
15 | }
16 |
17 | ///
18 | /// The length of this Curve in its associated spatial reference.
19 | ///
20 | public abstract double Length { get; }
21 |
22 | ///
23 | /// The start point of this Curve.
24 | ///
25 | public abstract RgPoint StartPoint { get; }
26 |
27 | ///
28 | /// The end point of this Curve.
29 | ///
30 | public abstract RgPoint EndPoint { get; }
31 |
32 | ///
33 | /// Returns true if this Curve is closed (StartPoint = EndPoint).
34 | ///
35 | public bool IsClosed
36 | {
37 | get { return (StartPoint.Equals(EndPoint)); }
38 | }
39 |
40 | ///
41 | /// true if this Curve is closed (StartPoint = EndPoint) and
42 | /// this Curve is simple (does not pass through the same point more than once).
43 | ///
44 | public abstract bool IsRing { get; }
45 |
46 | ///
47 | /// The position of a point on the line, parameterised by length.
48 | ///
49 | ///
50 | ///
51 | public abstract RgPoint Value(double t);
52 |
53 | public override GeometryType2 GeometryType
54 | {
55 | get
56 | {
57 | return GeometryType2.Curve;
58 | }
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Geometry.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Geometry.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/GeometryCollection.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/GeometryCollection.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/IGeometryCollection.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Geometries
2 | {
3 | ///
4 | /// Interface for a GeometryCollection. A GeometryCollection is a collection of 1 or more geometries.
5 | ///
6 | public interface IGeometryCollection : IGeometry
7 | {
8 | ///
9 | /// Returns the number of geometries in the collection.
10 | ///
11 | int NumGeometries { get; }
12 |
13 | ///
14 | /// Returns an indexed geometry in the collection
15 | ///
16 | /// Geometry index
17 | /// Geometry at index N
18 | Geometry Geometry(int N);
19 | }
20 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/ISpatialReference.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace RGeos.Geometries
3 | {
4 | ///
5 | /// The ISpatialRelation interface defines a set of named spatial relationship operators for geometric shape
6 | /// objects. The behavior of these operators is described in detail in the geometry object model sub-section of
7 | /// the Architecture section of the OpenGIS Simple Features specification. [NOT IMPLEMENTED]
8 | ///
9 | public interface ISpatialReference
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/LineString.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/LineString.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/LinearRing.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/LinearRing.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/MultiCurve.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Geometries
2 | {
3 | ///
4 | /// A MultiCurve is a one-dimensional GeometryCollection whose elements are Curves
5 | ///
6 | public abstract class MultiCurve : GeometryCollection
7 | {
8 | ///
9 | /// The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.
10 | ///
11 | public override int Dimension
12 | {
13 | get { return 1; }
14 | }
15 |
16 | ///
17 | /// Returns true if this MultiCurve is closed (StartPoint=EndPoint for each curve in this MultiCurve)
18 | ///
19 | public abstract bool IsClosed { get; }
20 |
21 | ///
22 | /// The Length of this MultiCurve which is equal to the sum of the lengths of the element Curves.
23 | ///
24 | public abstract double Length { get; }
25 |
26 | ///
27 | /// Returns the number of geometries in the collection.
28 | ///
29 | public new abstract int NumGeometries { get; }
30 |
31 | ///
32 | /// Returns an indexed geometry in the collection
33 | ///
34 | /// Geometry index
35 | /// Geometry at index N
36 | public new abstract Geometry Geometry(int N);
37 |
38 | public override GeometryType2 GeometryType
39 | {
40 | get
41 | {
42 | return GeometryType2.MultiCurve;
43 | }
44 | }
45 |
46 | }
47 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/MultiLineString.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/MultiLineString.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/MultiPoint.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/MultiPoint.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/MultiPolygon.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/MultiPolygon.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/MultiSurface.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.Geometries
2 | {
3 | ///
4 | /// A MultiSurface is a two-dimensional geometric collection whose elements are surfaces. The interiors of any
5 | /// two surfaces in a MultiSurface may not intersect. The boundaries of any two elements in a MultiSurface may
6 | /// intersect at most at a finite number of points.
7 | ///
8 | ///
9 | /// MultiSurface is a non-instantiable class in this specification, it defines a set of methods for its subclasses and
10 | /// is included for reasons of extensibility. The instantiable subclass of MultiSurface is MultiPolygon,
11 | /// corresponding to a collection of Polygons.
12 | ///
13 | public abstract class MultiSurface : GeometryCollection
14 | {
15 | ///
16 | /// The area of this Surface, as measured in the spatial reference system of this Surface.
17 | ///
18 | public abstract double Area { get; }
19 |
20 | ///
21 | /// The mathematical centroid for this Surface as a Point.
22 | /// The result is not guaranteed to be on this Surface.
23 | ///
24 | public abstract RgPoint Centroid { get; }
25 |
26 | ///
27 | /// A point guaranteed to be on this Surface.
28 | ///
29 | public abstract RgPoint PointOnSurface { get; }
30 |
31 | ///
32 | /// The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.
33 | ///
34 | public override int Dimension
35 | {
36 | get { return 2; }
37 | }
38 |
39 | public override GeometryType2 GeometryType
40 | {
41 | get
42 | {
43 | return GeometryType2.MultiSurface;
44 | }
45 | }
46 |
47 | }
48 | }
--------------------------------------------------------------------------------
/RGeos.Geometries/Point.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Point.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/Point3D.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Point3D.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/Polygon.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Polygon.cs
--------------------------------------------------------------------------------
/RGeos.Geometries/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos.Geometries")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("xike")]
12 | [assembly: AssemblyProduct("RGeos.Geometries")]
13 | [assembly: AssemblyCopyright("Copyright © xike 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("05bb74d8-ec36-45e1-a36a-562bb3cd4ab8")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos.Geometries/RGeos.Geometries.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/RGeos.Geometries/Spatial/RgSpatialAnalysis.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace RGeos.Geometries
3 | {
4 | public class RgSpatialAnalysis
5 | {
6 | ///
7 | /// 计算多边形中心点
8 | /// 利用三角形中心和面积作为权重计算。
9 | ///
10 | /// 多边形顶点x坐标数组
11 | /// 多边形顶点y坐标数组
12 | /// 多边形点数
13 | /// 中心点x坐标
14 | /// 中心点y坐标
15 | /// 多边形面积
16 | /// 返回0存在中心点
17 | public static int Controid(double[] x, double[] y, int n, out double xCentroid, out double yCentroid, out double area)
18 | {
19 | xCentroid = 0;
20 | yCentroid = 0;
21 | area = 0;
22 | int i, j;
23 | double ai;
24 | double atmp = 0;
25 | double xtmp = 0;
26 | double ytmp = 0;
27 | if (n < 3)
28 | {
29 | return 1;
30 | }
31 | for (i = n - 1, j = 0; j < n; i = j, j++)
32 | {
33 | ai = x[i] * y[j] - x[j] * y[i];
34 | atmp += ai;
35 | xtmp += (x[j] + x[i]) * ai;
36 | ytmp += (y[j] * y[i]) * ai;
37 | }
38 | area = atmp / 2;
39 | if (atmp != 0)
40 | {
41 | xCentroid = xtmp / 3 / atmp;
42 | yCentroid = ytmp / 3 / atmp;
43 | return 0;
44 | }
45 | return 2;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/RGeos.Geometries/Surface.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos.Geometries/Surface.cs
--------------------------------------------------------------------------------
/RGeos/Basic/MathEx.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Basic/MathEx.cs
--------------------------------------------------------------------------------
/RGeos/Converters/WellKnownBinary/WKBByteOrder.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005, 2006 - Morten Nielsen (www.iter.dk)
2 | //
3 | // This file is part of SharpMap.
4 | // SharpMap is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // SharpMap is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with SharpMap; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | namespace SharpMap.Converters.WellKnownBinary
19 | {
20 | ///
21 | /// Specifies the specific binary encoding (NDR or XDR) used for a geometry byte stream
22 | ///
23 | public enum WkbByteOrder : byte
24 | {
25 | ///
26 | /// XDR (Big Endian) Encoding of Numeric Types
27 | ///
28 | ///
29 | /// The XDR representation of an Unsigned Integer is Big Endian (most significant byte first).
30 | /// The XDR representation of a Double is Big Endian (sign bit is first byte).
31 | ///
32 | Xdr = 0,
33 | ///
34 | /// NDR (Little Endian) Encoding of Numeric Types
35 | ///
36 | ///
37 | /// The NDR representation of an Unsigned Integer is Little Endian (least significant byte first).
38 | /// The NDR representation of a Double is Little Endian (sign bit is last byte).
39 | ///
40 | Ndr = 1
41 | }
42 | }
--------------------------------------------------------------------------------
/RGeos/Geometries/Geometry.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/Geometry.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/GeometryCollection.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/GeometryCollection.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/IGeometryCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright 2005, 2006 - Morten Nielsen (www.iter.dk)
2 | //
3 | // This file is part of SharpMap.
4 | // SharpMap is free software; you can redistribute it and/or modify
5 | // it under the terms of the GNU Lesser General Public License as published by
6 | // the Free Software Foundation; either version 2 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // SharpMap is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU Lesser General Public License for more details.
13 |
14 | // You should have received a copy of the GNU Lesser General Public License
15 | // along with SharpMap; if not, write to the Free Software
16 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 |
18 | namespace SharpMap.Geometries
19 | {
20 | ///
21 | /// Interface for a GeometryCollection. A GeometryCollection is a collection of 1 or more geometries.
22 | ///
23 | public interface IGeometryCollection : IGeometry
24 | {
25 | ///
26 | /// Returns the number of geometries in the collection.
27 | ///
28 | int NumGeometries { get; }
29 |
30 | ///
31 | /// Returns an indexed geometry in the collection
32 | ///
33 | /// Geometry index
34 | /// Geometry at index N
35 | Geometry Geometry(int N);
36 | }
37 | }
--------------------------------------------------------------------------------
/RGeos/Geometries/ISpatialReference.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace SharpMap.Geometries
3 | {
4 | ///
5 | /// The ISpatialRelation interface defines a set of named spatial relationship operators for geometric shape
6 | /// objects. The behavior of these operators is described in detail in the geometry object model sub-section of
7 | /// the Architecture section of the OpenGIS Simple Features specification. [NOT IMPLEMENTED]
8 | ///
9 | public interface ISpatialReference
10 | {
11 | }
12 | }
--------------------------------------------------------------------------------
/RGeos/Geometries/LineString.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/LineString.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/LinearRing.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/LinearRing.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/MultiLineString.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/MultiLineString.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/MultiPoint.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/MultiPoint.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/MultiPolygon.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/MultiPolygon.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/MultiSurface.cs:
--------------------------------------------------------------------------------
1 | namespace SharpMap.Geometries
2 | {
3 | ///
4 | /// A MultiSurface is a two-dimensional geometric collection whose elements are surfaces. The interiors of any
5 | /// two surfaces in a MultiSurface may not intersect. The boundaries of any two elements in a MultiSurface may
6 | /// intersect at most at a finite number of points.
7 | ///
8 | ///
9 | /// MultiSurface is a non-instantiable class in this specification, it defines a set of methods for its subclasses and
10 | /// is included for reasons of extensibility. The instantiable subclass of MultiSurface is MultiPolygon,
11 | /// corresponding to a collection of Polygons.
12 | ///
13 | public abstract class MultiSurface : GeometryCollection
14 | {
15 | ///
16 | /// The area of this Surface, as measured in the spatial reference system of this Surface.
17 | ///
18 | public abstract double Area { get; }
19 |
20 | ///
21 | /// The mathematical centroid for this Surface as a Point.
22 | /// The result is not guaranteed to be on this Surface.
23 | ///
24 | public abstract Point Centroid { get; }
25 |
26 | ///
27 | /// A point guaranteed to be on this Surface.
28 | ///
29 | public abstract Point PointOnSurface { get; }
30 |
31 | ///
32 | /// The inherent dimension of this Geometry object, which must be less than or equal to the coordinate dimension.
33 | ///
34 | public override int Dimension
35 | {
36 | get { return 2; }
37 | }
38 |
39 | public override GeometryType2 GeometryType
40 | {
41 | get
42 | {
43 | return GeometryType2.MultiSurface;
44 | }
45 | }
46 |
47 | }
48 | }
--------------------------------------------------------------------------------
/RGeos/Geometries/Point.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/Point.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/Polygon.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/Polygon.cs
--------------------------------------------------------------------------------
/RGeos/Geometries/Surface.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Geometries/Surface.cs
--------------------------------------------------------------------------------
/RGeos/Geometry/RArc.cs:
--------------------------------------------------------------------------------
1 |
2 | namespace RGeos.Geometry
3 | {
4 | class RArc : RGeometry
5 | {
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RCircle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | class RCircle
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos/Geometry/REnvelope.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public class REnvelope
9 | {
10 | public RPoint LowLeft { get; set; }
11 | public RPoint TopRight { get; set; }
12 | public double Lower { get; set; }
13 | public double Left { get; set; }
14 | public double Top { get; set; }
15 | public double Right { get; set; }
16 | public double Height
17 | {
18 | get
19 | {
20 | return (double)(Top - Lower);
21 | }
22 | }
23 | public double Width
24 | {
25 | get
26 | {
27 | return (double)(Right - Left);
28 | }
29 | }
30 | public REnvelope()
31 | {
32 | }
33 | public REnvelope(double low, double top, double left, double right)
34 | {
35 | Left = left;
36 | Top = top;
37 | Right = right;
38 | Lower = low;
39 | }
40 | public REnvelope Union(REnvelope pEnv)
41 | {
42 | return null;
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RGeometry.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public abstract class RGeometry
9 | {
10 | //public abstract string ToString()
11 | //{
12 | // string s = string.Empty;
13 | // return s;
14 | //}
15 | //public abstract string ImportFromGML()
16 | //{
17 | // string s = string.Empty;
18 | // return s;
19 | //}
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RLine.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | ///
9 | /// 直线
10 | ///
11 | public class RLine : RGeometry
12 | {
13 | public RPoint P0;
14 | public RPoint P1;
15 | public REnvelope Envelop
16 | {
17 | get
18 | {
19 | if (P0 != null && P1 != null)
20 | {
21 | double left = Math.Min(P1.X, P0.X);
22 | double right = Math.Max(P0.X, P1.X);
23 | double lower = Math.Min(P0.Y, P1.Y);
24 | double top = Math.Max(P0.Y, P1.Y);
25 | REnvelope env = new REnvelope(lower, top, left, right);
26 | return env;
27 | }
28 | return null;
29 | }
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RPlane.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | ///
9 | /// 平面类
10 | ///
11 | public class RPlane : RGeometry
12 | {
13 | ///
14 | /// 平面上任意一点
15 | ///
16 | public RPoint P0;
17 | ///
18 | /// 法向量
19 | ///
20 | public Vector3d V;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RPointCollection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public interface IRPointCollection
9 | {
10 | List PointCollection { get; set; }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RPolygon.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 |
9 | public class RPolygon : RGeometry
10 | {
11 |
12 | }
13 | ///
14 | /// 2D凸多边形
15 | /// a Polygon is given by:
16 | /// int n = number of vertex points
17 | /// Point* V[] = an array of points with V[n]=V[0], V[n+1]=V[1]
18 | ///
19 | public class RConvexPolygon : RGeometry, IRPointCollection
20 | {
21 | public int n;
22 | public List PointCollection { get; set; }
23 | }
24 | ///
25 | /// 2D任意多边形
26 | ///
27 | public class RGerneralPolygon : RGeometry
28 | {
29 | public int NumOfRings { get; set; }
30 | public List RingList;
31 |
32 | public RGerneralPolygon()
33 | {
34 | RingList = new List();
35 | RRing ring = new RRing();
36 | RingList.Add(ring);
37 |
38 | }
39 | public RRing GetRing(int Index)
40 | {
41 | if (Index < RingList.Count)
42 | {
43 | return RingList[Index];
44 | }
45 | return null;
46 | }
47 | public void AddRing(RRing ring)
48 | {
49 | RingList.Add(ring);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RPolyline.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public class RPolyline : RGeometry
9 | {
10 | public int Number
11 | {
12 | get
13 | {
14 | return 0;
15 | }
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RRay.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | ///
9 | /// 射线
10 | ///
11 | public class RRay
12 | {
13 | RPoint pt;
14 | Vector3d vec3;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RRing.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | ///
9 | ///
10 | ///
11 | public class RRing : IRPointCollection
12 | {
13 | ///
14 | /// true是内环
15 | ///
16 | public bool OutOrInerialRing;
17 | public List PointCollection { get; set; }
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RSegment.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | ///
9 | /// 直线段
10 | ///
11 | public class RSegment : RGeometry
12 | {
13 | public RPoint P0;
14 | public RPoint P1;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RSphere.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public class RSphere : RGeometry
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos/Geometry/RTriangle.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Geometry
7 | {
8 | public class RTriangle
9 | {
10 | RPoint V0, V1, V2;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/HookHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Core.PluginEngine;
6 |
7 | namespace RGeos.PluginEngine
8 | {
9 | public class HookHelper
10 | {
11 | public static HookHelper Hook;
12 | public static HookHelper Instance()
13 | {
14 | if (Hook==null)
15 | {
16 | Hook = new HookHelper();
17 | }
18 | return Hook;
19 | }
20 | private HookHelper()
21 | {
22 | }
23 | public IMapControl MapControl;
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/ICommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.PluginEngine
7 | {
8 | public interface ICommand
9 | {
10 | string Name { get; set; }
11 | void OnCreate(HookHelper hook);
12 | void OnClick();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/IDisplayFeedback.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Drawing;
6 |
7 | namespace RGeos.PluginEngine
8 | {
9 | public interface IDisplayFeedback
10 | {
11 | IScreenDisplayOld Display { set; }// The display the feedback object will use.
12 | void MoveTo(Point pt);//Move to the new point.
13 | void Refresh(Graphics gc);// Call this after a refresh to show feedback again.
14 | double width { get; set; }
15 | Color color { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/IDisplayTransformation.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core.PluginEngine
7 | {
8 | // DisplayTransformation object to convert coordinates between map units and device units.
9 | public interface IDisplayTransformationOld
10 | {
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/ILayer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.PluginEngine
7 | {
8 | public interface ILayer
9 | {
10 | string Name { get; set; }
11 | string AliasName { get; set; }
12 | bool Visible { get; set; }
13 | void Draw(IScreenDisplayOld display);
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/IMap.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core.PluginEngine
7 | {
8 | public interface IMap
9 | {
10 |
11 |
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/IMapControl.cs:
--------------------------------------------------------------------------------
1 |
2 | using RGeos.PluginEngine;
3 | namespace RGeos.Core.PluginEngine
4 | {
5 | public interface IMapControl
6 | {
7 | ITool CurrentTool { get; set; }
8 | }
9 | public interface IMapControlOld : IMapControl
10 | {
11 | IScreenDisplayOld ScreenDisplay { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/ISelection.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core.PluginEngine
7 | {
8 | public interface ISelection
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/ISymbol.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.Core.PluginEngine
7 | {
8 | public interface ISymbol
9 | {
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/ITool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace RGeos.PluginEngine
8 | {
9 | public interface ITool : ICommand
10 | {
11 | void OnMouseMove(int x, int y);
12 | void OnMouseDown(int x, int y, MouseEventArgs e);
13 | void OnMouseUp(int x, int y);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/Layer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Core.PluginEngine;
6 | using System.Drawing;
7 | using RGeos.Geometry;
8 |
9 | namespace RGeos.PluginEngine
10 | {
11 | public abstract class Layer : ILayer
12 | {
13 | public string Name { get; set; }
14 | public string AliasName { get; set; }
15 | public bool Visible { get; set; }
16 | public virtual void Draw(IScreenDisplayOld display)
17 | {
18 | }
19 |
20 |
21 | }
22 | public class FetureLayer : Layer
23 | {
24 | public int ShapeType;
25 | public ISymbol Symbol;
26 | List mGeometries = new List();
27 | public override void Draw(IScreenDisplayOld display)
28 | {
29 | if (ShapeType == 0)
30 | {
31 | for (int i = 0; i < mGeometries.Count; i++)
32 | {
33 | RPoint pt = mGeometries[i] as RPoint;
34 | if (pt != null)
35 | {
36 | display.DrawPoint(new Pen(Color.Red), pt);
37 | }
38 |
39 | }
40 | }
41 | if (ShapeType == 1)
42 | {
43 | for (int i = 0; i < mGeometries.Count; i++)
44 | {
45 | RPolyline pt = mGeometries[i] as RPolyline;
46 | if (pt != null)
47 | {
48 | display.DrawPolyline(new Pen(Color.Red), pt);
49 | }
50 |
51 | }
52 | }
53 | if (ShapeType == 2)
54 | {
55 | for (int i = 0; i < mGeometries.Count; i++)
56 | {
57 | RPolygon pt = mGeometries[i] as RPolygon;
58 | if (pt != null)
59 | {
60 | display.DrawPolygon (new Pen(Color.Red), pt);
61 | }
62 |
63 | }
64 | }
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/Map.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.Geometry;
6 | using RGeos.Core.PluginEngine;
7 | using System.Drawing;
8 |
9 | namespace RGeos.PluginEngine
10 | {
11 | public class Map : IMap
12 | {
13 | public REnvelope Extent { get; set; }
14 | public List Layers { get; set; }
15 | public Map()
16 | {
17 | Layers = new List();
18 | }
19 |
20 | public float Zoom { get; set; }
21 |
22 | public REnvelope Size { get; set; }
23 |
24 | public RPoint Center;
25 | public double PixelAspectRatio { get; set; }
26 | public double PixelWidth;
27 | public double PixelHeight;
28 | IScreenDisplayOld mScreenDisplay = null;
29 | public IScreenDisplayOld ScreenDisplay
30 | {
31 | get
32 | {
33 | return mScreenDisplay;
34 | }
35 | }
36 | public ISelection Selection { get; set; }
37 |
38 | public void AddLayer(ILayer layer)
39 | {
40 | Layers.Add(layer);
41 | }
42 | public void RemoveLayer(ILayer layer)
43 | {
44 | Layers.Remove(layer);
45 | }
46 |
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/RBaseCommand.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows.Forms;
6 |
7 | namespace RGeos.PluginEngine
8 | {
9 | public abstract class RBaseCommand : ITool
10 | {
11 | public abstract string Name { get; set; }
12 | public abstract void OnCreate(HookHelper hook);
13 | public abstract void OnClick();
14 | public abstract void OnMouseMove(int x, int y);
15 | // public abstract void OnMouseDown(int x, int y);
16 | public abstract void OnMouseDown(int x, int y, MouseEventArgs e);
17 | public abstract void OnMouseUp(int x, int y);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/RgeosUnits.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.PluginEngine
7 | {
8 | public enum RgeosUnits
9 | {
10 | esriUnknownUnits = 0,// Unknown.
11 | esriInches = 1,//Inches.
12 | esriPoints = 2,// Points.
13 | esriFeet = 3, //Feet.
14 | esriYards = 4,// Yards.
15 | esriMiles = 5,//Miles.
16 | esriNauticalMiles = 6, //Nautical miles.
17 | esriMillimeters = 7,// Millimeters.
18 | esriCentimeters = 8, //Centimeters.
19 | esriMeters = 9,//Meters.
20 | esriKilometers = 10,// Kilometers.
21 | esriDecimalDegrees = 11,// Decimal degrees.
22 | esriDecimeters = 12,// Decimeters.
23 | esriUnitsLast = 13
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/Transform.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Drawing;
6 | using RGeos.Geometry;
7 | using RGeos.Core.PluginEngine;
8 |
9 | namespace RGeos.PluginEngine
10 | {
11 | public class Transform
12 | {
13 | public static float m_screenResolution = 96;
14 | public static PointF ToScreen(RPoint pt, UcMapControl mapCtrl)
15 | {
16 | PointF transformedPoint = new PointF((float)pt.X, (float)pt.Y);
17 | transformedPoint.Y = mapCtrl.ScreenHeight() - transformedPoint.Y;//将Unit坐标系转换为屏幕坐标系,Y轴反向,此时Y坐标为屏幕坐标系坐标
18 | transformedPoint.Y *= m_screenResolution * mapCtrl.Zoom;//相对于屏幕原点放大
19 | transformedPoint.X *= m_screenResolution * mapCtrl.Zoom;
20 |
21 | transformedPoint.X += mapCtrl.m_panOffset.X + mapCtrl.m_dragOffset.X;
22 | transformedPoint.Y += mapCtrl.m_panOffset.Y + mapCtrl.m_dragOffset.Y;
23 | return transformedPoint;
24 | }
25 | public static RPoint ToUnit(PointF screenpoint, UcMapControl mapCtrl)
26 | {
27 | float panoffsetX = mapCtrl.m_panOffset.X + mapCtrl.m_dragOffset.X;
28 | float panoffsetY = mapCtrl.m_panOffset.Y + mapCtrl.m_dragOffset.Y;
29 | float xpos = (screenpoint.X - panoffsetX) / (m_screenResolution * mapCtrl.Zoom);
30 | float ypos = mapCtrl.ScreenHeight() - ((screenpoint.Y - panoffsetY)) / (m_screenResolution * mapCtrl.Zoom);
31 | return new RPoint(xpos, ypos, 0);
32 | }
33 | //将屏幕距离计算为Zoom等级下的地图距离
34 | public static double ToUnit(float screenvalue, UcMapControl mapCtrl)
35 | {
36 | return (double)screenvalue / (double)(m_screenResolution * mapCtrl.Zoom);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/RGeos/PluginEngine/UcMapControl.Designer.cs:
--------------------------------------------------------------------------------
1 | namespace RGeos.PluginEngine
2 | {
3 | partial class UcMapControl
4 | {
5 | ///
6 | /// 必需的设计器变量。
7 | ///
8 | private System.ComponentModel.IContainer components = null;
9 |
10 | ///
11 | /// 清理所有正在使用的资源。
12 | ///
13 | /// 如果应释放托管资源,为 true;否则为 false。
14 | protected override void Dispose(bool disposing)
15 | {
16 | if (disposing && (components != null))
17 | {
18 | components.Dispose();
19 | }
20 | base.Dispose(disposing);
21 | }
22 |
23 | #region 组件设计器生成的代码
24 |
25 | ///
26 | /// 设计器支持所需的方法 - 不要
27 | /// 使用代码编辑器修改此方法的内容。
28 | ///
29 | private void InitializeComponent()
30 | {
31 | this.label1 = new System.Windows.Forms.Label();
32 | this.SuspendLayout();
33 | //
34 | // label1
35 | //
36 | this.label1.AutoSize = true;
37 | this.label1.Location = new System.Drawing.Point(13, 12);
38 | this.label1.Name = "label1";
39 | this.label1.Size = new System.Drawing.Size(41, 12);
40 | this.label1.TabIndex = 0;
41 | this.label1.Text = "label1";
42 | //
43 | // UcMapControl
44 | //
45 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
46 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
47 | this.Controls.Add(this.label1);
48 | this.Name = "UcMapControl";
49 | this.Size = new System.Drawing.Size(600, 400);
50 |
51 | this.ResumeLayout(false);
52 | this.PerformLayout();
53 |
54 | }
55 |
56 | #endregion
57 |
58 | private System.Windows.Forms.Label label1;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/RGeos/Plugins/DrawPointTool.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using RGeos.PluginEngine;
6 | using System.Drawing;
7 | using RGeos.Geometry;
8 | using System.Windows.Forms;
9 | namespace RGeos.Plugins
10 | {
11 | class DrawPointTool : RBaseCommand
12 | {
13 | UcMapControl mMapCtrl = null;
14 | public IDisplayFeedback DrawPhase = null;
15 | IScreenDisplayOld mScreenDisplay = null;
16 | public override string Name { get; set; }
17 |
18 | public override void OnCreate(HookHelper hook)
19 | {
20 | Name = "绘制点";
21 | mMapCtrl = hook.MapControl as UcMapControl;
22 | mScreenDisplay = mMapCtrl.mScreenDisplay;
23 | }
24 |
25 | public override void OnClick()
26 | {
27 |
28 | }
29 |
30 | public override void OnMouseMove(int x, int y)
31 | {
32 |
33 |
34 | }
35 | int n = 0;
36 | public override void OnMouseDown(int x, int y, MouseEventArgs e)
37 | {
38 |
39 | RPoint P1 = new RPoint(x, y, 0);
40 | PointF p2 = new PointF((float)P1.X, (float)P1.Y);
41 | mScreenDisplay.DrawPoint(Pens.Red, P1);
42 |
43 | }
44 | public override void OnMouseUp(int x, int y)
45 | {
46 | Color colr = Color.Red;
47 |
48 | //Brush brush = new SolidBrush(colr);
49 | //Pen pen = new Pen(brush,1.0f);
50 |
51 |
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/RGeos/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Windows.Forms;
5 |
6 | namespace RGeos
7 | {
8 | static class Program
9 | {
10 | ///
11 | /// 应用程序的主入口点。
12 | ///
13 | [STAThread]
14 | static void Main()
15 | {
16 | Application.EnableVisualStyles();
17 | Application.SetCompatibleTextRenderingDefault(false);
18 | Application.Run(new FrmPartialRefresh());
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/RGeos/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过以下
6 | // 特性集控制。更改这些特性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("RGeos")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Microsoft")]
12 | [assembly: AssemblyProduct("RGeos")]
13 | [assembly: AssemblyCopyright("Copyright © Microsoft 2013")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 特性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("36082dc7-73eb-4bd4-8a4e-87e3780c2101")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/RGeos/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.1008
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace RGeos.Core.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RGeos/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RGeos/RGeos.First.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGeos.First", "RGeos.First.csproj", "{02566164-FCE5-431C-85E9-F108368590F1}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|x86 = Debug|x86
9 | Release|x86 = Release|x86
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {02566164-FCE5-431C-85E9-F108368590F1}.Debug|x86.ActiveCfg = Debug|x86
13 | {02566164-FCE5-431C-85E9-F108368590F1}.Debug|x86.Build.0 = Debug|x86
14 | {02566164-FCE5-431C-85E9-F108368590F1}.Release|x86.ActiveCfg = Release|x86
15 | {02566164-FCE5-431C-85E9-F108368590F1}.Release|x86.Build.0 = Release|x86
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/RGeos/SpatialAnalysis/RSpatialAnalysis.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace RGeos.SpatialAnalysis
7 | {
8 | public class RSpatialAnalysis
9 | {
10 | ///
11 | /// 计算多边形中心点
12 | /// 利用三角形中心和面积作为权重计算。
13 | ///
14 | /// 多边形顶点x坐标数组
15 | /// 多边形顶点y坐标数组
16 | /// 多边形点数
17 | /// 中心点x坐标
18 | /// 中心点y坐标
19 | /// 多边形面积
20 | /// 返回0存在中心点
21 | public static int Controid(double[] x, double[] y, int n, out double xCentroid, out double yCentroid, out double area)
22 | {
23 | xCentroid = 0;
24 | yCentroid = 0;
25 | area = 0;
26 | int i, j;
27 | double ai;
28 | double atmp = 0;
29 | double xtmp = 0;
30 | double ytmp = 0;
31 | if (n < 3)
32 | {
33 | return 1;
34 | }
35 | for (i = n - 1, j = 0; j < n; i = j, j++)
36 | {
37 | ai = x[i] * y[j] - x[j] * y[i];
38 | atmp += ai;
39 | xtmp += (x[j] + x[i]) * ai;
40 | ytmp += (y[j] * y[i]) * ai;
41 | }
42 | area = atmp / 2;
43 | if (atmp != 0)
44 | {
45 | xCentroid = xtmp / 3 / atmp;
46 | yCentroid = ytmp / 3 / atmp;
47 | return 0;
48 | }
49 | return 2;
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/RGeos/Topology/TopologicRelationship.cs:
--------------------------------------------------------------------------------
1 | using RGeos.Geometry;
2 |
3 | namespace RGeos.Topology
4 | {
5 | ///
6 | /// 拓扑关系:相交、相离
7 | ///
8 | public class TopologicRelationship
9 | {
10 | ///
11 | /// 点在直线上
12 | ///
13 | ///
14 | ///
15 | ///
16 | public static bool IsInLine(RPoint rPt, RLine rLine)
17 | {
18 | bool flag = false;
19 | return flag;
20 | }
21 | ///
22 | /// 点是否在共线的线段上
23 | /// 1 = P is inside S;
24 | /// 0 = P is not inside S
25 | ///
26 | ///
27 | /// a point P
28 | /// a collinear segment S
29 | ///
30 | public static int InSegment(RPoint P, RSegment S)
31 | {
32 | if (S.P0.X != S.P1.X)
33 | { // S is not vertical
34 | if (S.P0.X <= P.X && P.X <= S.P1.X)
35 | return 1;
36 | if (S.P0.X >= P.X && P.X >= S.P1.X)
37 | return 1;
38 | }
39 | else
40 | { // S is vertical, so test y coordinate
41 | if (S.P0.Y <= P.Y && P.Y <= S.P1.Y)
42 | return 1;
43 | if (S.P0.Y >= P.Y && P.Y >= S.P1.Y)
44 | return 1;
45 | }
46 | return 0;
47 | }
48 | ///
49 | /// 点是否在线段上
50 | ///
51 | /// 任意的点
52 | /// 任意线段
53 | ///
54 | public static int In2D_Point_Segment(RPoint P, RSegment S)
55 | {
56 |
57 | return 0;
58 | }
59 |
60 | ///
61 | /// 点在多边形中
62 | ///
63 | ///
64 | ///
65 | ///
66 | public static bool IsInPolygon(RPoint rPt, RPolygon rPolygon)
67 | {
68 | bool flag = false;
69 | return flag;
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/RGeos/Utilities/Transform.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yhexie/RGEOS/8efbf5a1fdde8fea4811375a4279d53c5306a7c0/RGeos/Utilities/Transform.cs
--------------------------------------------------------------------------------
/RGeos/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------