ThinkGeo.com    |     Documentation    |     Premium Support

How do we use ProjNet?

I cannot wait on a resolution to the Proj4 memory issues.   Your "feature list" indicates support for Projnet, but I searched the forum for projnet and did not find any example.    Can you tell me what we must do to switch to projnet for our Projection objects?   I can create their MathTransform just fine... been using it for two years.   But do you have wrapper or something to expose it as a Projection interface?



Ted,


 Attachment contains the Proj4.net DLL and its wrapper. You can use it as following codes:
 

SridProjection projection = new SridProjection(4326, 3005);
ShapeFileFeatureLayer worldLayer1 = new ShapeFileFeatureLayer(@"C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Samples\SampleData\Data\USStates.shp", ShapeFileReadWriteMode.ReadOnly);
worldLayer1.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.State1;
worldLayer1.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
worldLayer1.FeatureSource.Projection = projection;

 

One thing I want to point out is that you have to copy the SRID.csv file to your Application folder.
 
Any more problems just let me know.
 
Thanks.
 
Yale


864-ProjNet_Extension.zip (137 KB)

Thanks.  Earlier, I realized how easy it was to wrap my own ProjNet implementation and did so.   This solved my problem with the Proj4 problems. 
  
 Good to always have a Plan B :)

Ted, 
  
 Thanks for your post! 
  
 We will still do more investigations about the Proj4 issue which are reported in other posts! 
  
 Let me know if you have any problems! 
  
 Thanks. 
  
 Yale