Latest and Stable v0.9 code?

Topics: SharpMap Project, SharpMap v0.9 / v1.x
Sep 11, 2009 at 6:58 PM

Can some tell me which changeset we should use for the best version of the version 0.9 code?  Specifically im trying (so far unsuccessfully I might at) to implement a SQL 2008 provider written by Bill Dollins referenced here:  http://geobabble.wordpress.com/2007/11/28/sql-server-2008-sharpmap-data-provider-code/

 

However, Im running into the exact same problems that the people commenting on the post ran into so Im looking for the last/best 0.9 changeset to try and get this working!  Any and ALL help is fully appreciated...

 

 

thanks,

 

Kevin

Coordinator
Sep 11, 2009 at 8:17 PM
Edited Sep 11, 2009 at 8:21 PM

Hi Kevin, the latest "0.9" code is the trunk of codeplex currently at #57305. Looking at Bill Dollins' code briefly (eyeballs only - no compiler) it should compile ok. 0.9 is a bit of a misnomer it is the natural evolution of what was once 0.9 - the other branches have fundamental changes to them.
I will try and add Bill's provider to the source when I get a chance. If you have any issues just check the return type (and possibly argument types) of each method against the IProvider interface - they will not have changed much. If they have changed, the direction will be towards a less specific or interface type

hth jd

Sep 12, 2009 at 11:06 AM

So in the #57305 drop should I focus on just the 0.9 branch in that and not the truck then as the truck appears to be 2.0?  Or do I need to merge them?  I tried to run just the 0.9 drop but I was having some dependency missing issue with it…  If I could get the 0.9 drop to compile and run with Bill’s code that would be awesome.  Also, does sharpmap only work with the geometry datatype then and not geography?  All of my data is in geography so Im assuming I would need geometry columns as well for the bitmap rendering?

Thanks again for any/all help John – totally appreciated!

Best,

Kevin

From: johndiss [mailto:notifications@codeplex.com]
Sent: Friday, September 11, 2009 4:17 PM
To: kevin.stong@gmail.com
Subject: Re: Latest and Stable v0.9 code? [SharpMap:68685]

From: johndiss

Hi Kevin, the latest "0.9" code is the trunk of codeplex currently at #57305 looking at Bill Dollins' code briefly (eyeballs only - no compiler) it should compile ok. 0.9 is a bit of a misnomer it is the natural evolution of what was once 0.9 - the other branches have fundamental changes to them.
I will try and add Bill's provider to the source when I get a chance. If you have any issues just check the return type (and possibly argument types) of each method against the IProvider interface - they will not have changed much. If they have changed, the direction will be towards a less specific or interface type

hth jd

Read the full discussion online.

To add a post to this discussion, reply to this email (SharpMap@discussions.codeplex.com)

To start a new discussion for this project, email SharpMap@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com

Coordinator
Sep 12, 2009 at 12:36 PM
Edited Sep 12, 2009 at 12:37 PM

Hi Kevin, ignore anything in the branches folder - just go straight to the codeplex trunk - it should build out of the box. [An early branch version of v2 is in the branches folder, but the real/active one is @googlecode.]
You shouldn't need to do any merging. 
All of SharpMap's geometry/topology is planar so you will need to use the SqlGeometry data type.

cheers jd

BTW I would recommend using Tortoise to download the code - that way you can stay current with minimal fuss..

Coordinator
Sep 13, 2009 at 11:45 AM

I have added Bill Dollins' provider to the trunk source - renamed to SqlServer2008 cheers jd

Sep 13, 2009 at 1:19 PM

 

Hi John - great news!

 

First, thanks for adding the provider and for the continued assistance!  I actually also added the provider successfully last night to the truck <ironically named exactly the same spelling/syntax everything :) > so Im also happy to report that it works really nicely - thanks to Bill and yourself for the work!

 

I'm on my last hurdle to implementing a sql server 2008 to Bing maps tile generator (based on Morten's previous sample from a while back) and it stems from some transformation logic that seems to be missing from the trunk - here is the code snippet Im using that was originally provided by Morten:

 

		public static ICoordinateTransformation Transform2Mercator(ICoordinateSystem source)
		{
			CoordinateSystemFactory cFac = new SharpMap.CoordinateSystems.CoordinateSystemFactory();

			System.Collections.Generic.List<ProjectionParameter> parameters = new System.Collections.Generic.List<ProjectionParameter>(5);
			parameters.Add(new ProjectionParameter("latitude_of_origin", 0));
			parameters.Add(new ProjectionParameter("central_meridian", 0));
			parameters.Add(new ProjectionParameter("false_easting", 0));
			parameters.Add(new ProjectionParameter("false_northing", 0));
			IProjection projection = cFac.CreateProjection("Mercator", "Mercator_2SP", parameters);

			IProjectedCoordinateSystem coordsys = cFac.CreateProjectedCoordinateSystem("Mercator", source as IGeographicCoordinateSystem, projection, LinearUnit.Metre, new AxisInfo("East", AxisOrientationEnum.East), new AxisInfo("North", AxisOrientationEnum.North));

			return new CoordinateTransformationFactory().CreateFromCoordinateSystems(source, coordsys);
		}

 

In the original code sample ICoordinateTransformation, CoordinateSystemFactory, & ProjectParameter were all part of the SharpMap.CoordinateSystems namespace but in the current trunk they are no longer there...  can you point me in the right direction of where they were moved to?

 

 

thanks again!

 

 

Kevin

 

Coordinator
Sep 13, 2009 at 3:41 PM
Edited Sep 13, 2009 at 3:44 PM

Hi Kevin, SharpMap.CoordinateSystems was factored out to a sister project ProjNet (http://projnet.codeplex.com) and the namespace has been recently changed to ProjNet.CoordinateSystems - there is an old projnet (still under SharpMap.CoordinateSystems) dll in the external references directory, use this one rather than trying to build against the latest projnet as I think the dependency GeoAPI has changed and you may end up with dependencies on two different versions. hth jd

BTW I would edit your post above and remove your personal details to lessen the potential spam you may receive..

Sep 16, 2009 at 2:58 PM

Hi John - 

 

Just wanted to follow up and let you know I got everything working and I truely appreciate all the effort on your end to help me out!  

 

All the best,

 

Kevin

Coordinator
Sep 16, 2009 at 3:39 PM

Glad it helped jd