Projection::LambertConformalConic error

Nov 13, 2009 at 9:30 PM

<font size="1">




Has anyone run into the error below when using the LambertConformalConic projection?

A .NET Framework error occurred during execution of user-defined routine or aggregate "Projection":

System.Resources.MissingManifestResourceException: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Microsoft.SqlServer.SpatialToolbox.Resource.resources" was correctly embedded or linked into assembly "SQLSpatialTools" at compile time, or that all the satellite assemblies required are loadable and fully signed.

Here is a sql script sample causing the issue on the server:

-- Project point and linestring using Lambert Conformal Conic projection

declare @lambert Projection

set @lambert = Projection::LambertConformalConic(0, 0, 0, 0)

select @lambert.Project('POINT (45 30)').ToString()

select @lambert.Unproject(@lambert.Project('LINESTRING (10 0, 10 10)')).ToString()

select @lambert.ToString()

Here is C# code that causes the same error:
        private void createPoint(double X, double Y)
            SqlGeometryBuilder point = new SqlGeometryBuilder();
            point.BeginFigure(X, Y);  

            SqlProjection project = new SqlProjection();
            project = SqlProjection.LambertConformalConic(0, 0, 0, 0);

            SqlGeography geoPoint =  project.UnprojectWithSRID(point.ConstructedGeometry, 4326);

            string t = geoPoint.Lat.ToString();


<font size="2" color="#808080">

Thank you,





Jun 18, 2011 at 6:08 AM

Bit late I know but the problem lies in Resource.Designer.resx where there is a reference to this resource

There is a line that need changing to  

global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SQLSpatialTools.Resource", typeof(Resource).Assembly);

This will give the correct references