Skip to content

Commit a08b6ae

Browse files
committed
Fix to nuspec file
Removed \n in AssemblyDescription New unit test
1 parent 1c3d272 commit a08b6ae

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

ProjNET.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
<version>$version$</version>
66
<authors>Morton Nielsen, NetTopologySuite - Team</authors>
77
<owners>NetTopologySuite - Team</owners>
8-
<licenseUrl>http://projnet.codeplex.com/license</licenseUrl>
8+
<licenseUrl>https://raw.githubusercontent.com/NetTopologySuite/ProjNet4GeoAPI/master/LICENSE</licenseUrl>
99
<projectUrl>https://github.com/NetTopologySuite/ProjNet4GeoAPI</projectUrl>
10-
<!--<iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>-->
10+
<iconUrl>https://raw.githubusercontent.com/NetTopologySuite/ProjNet4GeoAPI/master/icon.png</iconUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1212
<description>.NET Spatial Reference and Projection Engine.
1313
Proj.NET performs point-to-point coordinate conversions between geodetic coordinate systems for use in fx. Geographic Information Systems (GIS) or GPS applications. The spatial reference model used adheres to the Simple Features specification.
1414
</description>
1515
<copyright>Copyright 2006-2015</copyright>
1616
<tags>OGC SFS Projection</tags>
1717
<dependencies>
18-
<dependency id="GeoAPI.CoordinateSystems" version="[1.7.5-pre018, )" />
18+
<dependency id="GeoAPI.CoordinateSystems" version="[$geoapiversion$, )" />
1919
</dependencies>
2020
</metadata>
2121
<files>

ProjNet.Tests/SharpMapIssues.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using GeoAPI.CoordinateSystems;
33
using GeoAPI.CoordinateSystems.Transformations;
44
using NUnit.Framework;
5+
using ProjNet.CoordinateSystems;
56

67
namespace ProjNet.UnitTests
78
{
@@ -66,5 +67,31 @@ public void TestAuthorityCodeParsing()
6667
//Assert.AreEqual(cs1, cs2);
6768
Assert.IsTrue(cs1.EqualParams(cs2));
6869
}
70+
71+
[Test]
72+
public void Test25832To3857()
73+
{
74+
75+
const string wkt1 = //"PROJCS[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"European_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],AUTHORITY[\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AUTHORITY[\"EPSG\",\"25832\"]]";
76+
"PROJCS[\"ETRS89 / UTM zone 32N\",GEOGCS[\"ETRS89\",DATUM[\"European_Terrestrial_Reference_System_1989\",SPHEROID[\"GRS 1980\",6378137,298.257222101,AUTHORITY[\"EPSG\",\"7019\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6258\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4258\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",9],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],AUTHORITY[\"EPSG\",\"25832\"],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]";
77+
78+
ICoordinateSystem cs1 = null, cs2 = null;
79+
Assert.DoesNotThrow(() => cs1 = CoordinateSystemFactory.CreateFromWkt(wkt1));
80+
Assert.IsNotNull(cs1);
81+
const string wkt2 = "PROJCS[\"WGS 84 / Pseudo-Mercator\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\", SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],PROJECTION[\"Mercator_1SP\"],PARAMETER[\"latitude_of_origin\", 0],PARAMETER[\"central_meridian\",0],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",0],PARAMETER[\"false_northing\",0],EXTENSION[\"PROJ4\",\"+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs\"],AUTHORITY[\"EPSG\",\"3857\"],AXIS[\"X\",EAST],AXIS[\"Y\",NORTH]]";
82+
Assert.DoesNotThrow(() => cs2 = CoordinateSystemFactory.CreateFromWkt(wkt2));
83+
Assert.IsNotNull(cs2);
84+
85+
ICoordinateTransformation ct = null;
86+
Assert.DoesNotThrow(() => ct = CoordinateTransformationFactory.CreateFromCoordinateSystems(cs1, cs2));
87+
Assert.IsNotNull(ct);
88+
Assert.DoesNotThrow(() => ct = CoordinateTransformationFactory.CreateFromCoordinateSystems(cs2, cs1));
89+
Assert.IsNotNull(ct);
90+
Assert.DoesNotThrow(() => ct = CoordinateTransformationFactory.CreateFromCoordinateSystems(cs1, ProjectedCoordinateSystem.WebMercator));
91+
Assert.IsNotNull(ct);
92+
Assert.DoesNotThrow(() => ct = CoordinateTransformationFactory.CreateFromCoordinateSystems(ProjectedCoordinateSystem.WebMercator, cs1));
93+
Assert.IsNotNull(ct);
94+
}
95+
6996
}
7097
}

ProjNet/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using System.Runtime.InteropServices;
33

44
[assembly: AssemblyTitle("Proj.NET")]
5-
[assembly: AssemblyDescription("Proj.NET performs point-to-point coordinate conversions between geodetic coordinate systems for use in .Net, Geographic Information Systems (GIS) or GPS applications.\nThe spatial reference model used adheres to the Simple Features specification.")]
5+
[assembly: AssemblyDescription("Proj.NET performs point-to-point coordinate conversions between geodetic coordinate systems for use in .Net, Geographic Information Systems (GIS) or GPS applications. The spatial reference model used adheres to the Simple Features specification.")]
66
#if DEBUG
77
[assembly: AssemblyConfiguration("Debug")]
88
#else

0 commit comments

Comments
 (0)