[MetaCRS] Anyone developing CSMap for NET?
Andre Barth
Andre.Barth at autodesk.com
Mon Jan 17 03:35:44 EST 2011
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é
-----Original Message-----
From: metacrs-bounces at lists.osgeo.org [mailto:metacrs-bounces at lists.osgeo.org] On Behalf Of STEPHEN STANTON
Sent: Sonntag, 16. Januar 2011 23:32
To: metacrs at lists.osgeo.org
Subject: RE: [MetaCRS] Anyone developing CSMap for NET?
Thanks André, I had a look at the MapGuide classes, but decided there's just too much baggage - it would take me a month to get up to speed, and make any installation a bit unwieldy.
So I'm looking once more at using CSMap itself. Having actually looked at the user manual, I now see how to iterate over coordinate systems, datums, and ellipsoids. I was hoping that access to information on categories would follow the same pattern, but it looks like they're handled differently. Is there any documentation out there, or example code that shows how categories might be used as part of a coordinate system browser?
Steve
P.S. Is there a CSMap developers list that I should perhaps be posting to?
--- On Mon, 10/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, 10 January, 2011, 7:11
> Hi Stephen,
>
> You could use the MapGuide managed API to (indirectly) access the
> CsMap API - not all of CsMap's capabilities are exposed, though.
>
> Take a look at
> http://svn.osgeo.org/mapguide/trunk/MgDev/Common/Geometry/CoordinateSy
> stem/
> - this is the API your managed app can be implemented against.
>
> CsMap virtually has no dependencies on other 3rd party libs whereas
> MapGuide has. Don't know, whether this would be a problem for you.
>
> André
>
> -----Original Message-----
> From: metacrs-bounces at lists.osgeo.org
> [mailto:metacrs-bounces at lists.osgeo.org]
> On Behalf Of STEPHEN STANTON
> Sent: Sonntag, 9. Januar 2011 00:29
> To: metacrs at lists.osgeo.org
> Subject: [MetaCRS] Anyone developing CSMap for NET?
>
> I've been looking to see if I can use CSMap as part of my C#
> application, since the codebase is full of loads of good stuff. I
> thought of trying out SWIG to generate some C# bindings, but I get the
> impression the results would be a bit messy.
>
> Meanwhile, if I look at Proj.Net on codeplex, I see something that
> looks relatively intuitive (perhaps that's due to GeoAPI.NET). But the
> number of map projections supported by Proj.Net isn't that extensive,
> and it seems no-one has been committing for ages.
>
> Is anybody working on code to make the CSMap code more accessible? If
> not, what needs to be done to make it happen, and can I help?
>
> Steve
_______________________________________________
MetaCRS mailing list
MetaCRS at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/metacrs
More information about the MetaCRS
mailing list