[MetaCRS] Anyone developing CSMap for NET?

STEPHEN STANTON sstanton at btinternet.com
Mon Jan 17 09:29:22 EST 2011


Hi André,

Sigh, you may well be right. I had just been hoping that keeping things close to the CSMap core would keep the deployment package nice and dainty. I worked with C some 20 years ago, and don't really want to go back to that world!
 
My requirements are very light, the most arduous is being able to present the user with a selection of coordinate systems to choose from at the start of a mapping project. I figured on a one-off call to something that would go through the various CSD files, transferring the info to a System.Data.DataSet that my UI would use.

Thereafter, all I need to do is a few periodic calls to grab scale factors at specific points.

Steve


--- On Mon, 17/1/11, Andre Barth <Andre.Barth at autodesk.com> wrote:

> From: Andre Barth <Andre.Barth at autodesk.com>
> Subject: RE: [MetaCRS] Anyone developing CSMap for NET?
> To: "STEPHEN STANTON" <sstanton at btinternet.com>, "metacrs at lists.osgeo.org" <metacrs at lists.osgeo.org>
> Date: Monday, 17 January, 2011, 8:35
> Steve,
> 
> a couple of comments...
> 
> A lot of (or let's say some...) code in the MapGuide
> Coordinate System API is about starting up and tearing down
> the CsMap API. Secondly, CsMap is mainly C code (don't know
> whether you'd like/love that) and, for example, you'll have
> to do all the CS_Free(x)s instead of having the comfort of
> auto pointering via FDO's/MapGuide's Ptr<>.
> 
> And there's more - take a look at the implementation
> classes of the coordinate system API: all that's done there
> will have to be done by you again: codes / naming /
> validation / file locking
> 
> I don't know, what your software has to achieve in
> particular, but iterating over all the various CS types
> (datums, ellipsoids, etc.) is dead simple - rather 51
> seconds to get up to speed:
> 
> MgCoordinateSystemEnum categoryEnum =
> categoryDict.GetEnum();
> int categoryCount = categoryDict.GetSize();
> MgDisposableCollection categoryCollection =
> categoryEnum.Next(categoryCount);
> 
> for (int categoryIndex = 0; categoryIndex <
> categoryCount; categoryIndex++)
> {
>            
>    MgCoordinateSystemCategory category =
> (MgCoordinateSystemCategory)categoryCollection.GetItem(categoryIndex);
>     ...
> }
> 
> //Don't forget to dispose everything - unfortunately you
> cannot use [using] but a custom, generic disposable wrapper
> solves the problem.
> 
> Thanks,
> André



More information about the MetaCRS mailing list