----- Original Message -----
From: "Chris DuBuc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 11:07 AM
Subject: Re: MI-L Coordinate Conversion Lat/Lon to UTM - Summary


> Thanks to all who replied to my request...the information was exactly what
I
> was looking for. FYI, my client, for various reasons, decided to purchase
> the Blue Marble OCX...making my job easy.
>
> Responses:
>
> Uffe Kousgaard wrote:
>
> Hi Chris,
>
> Writing your own math ain't so difficult since all the formula's are
> available from here:
> http://www.gpsy.com/gpsinfo/geotoutm/
>
> I have got a version of it in Delphi (binary included) here:
> http://www.routeware.dk/download/utm2ll.zip
>
> World wide UTM zones as MapInfo table:
> http://www.routeware.dk/download/utm.zip
>
> Regards
> Uffe Kousgaard
>
> Paul Crisp wrote:
>
> I'd be careful using MapX to do this sort of thing - there was a bug (now
> fixed?) in 4.5 about the scale factor.
>
> I put a VB class on Directions last year which does this conversion both
> ways (also a couple of other things eg map ref to UTM in the UK) - the
> class instantiates with the British National Grid UTM settings but they're
> all exposed properties and you should be able to hack it for your own
area.
>
> Haven't looked at .NET in much detail but this is all algorithms and I
can't
> imagine it would take long to port.
>
> Brad Matthews wrote:
>
> Chris,
>
> I haven't actually done this (at least not intentionally), but it might be
> worth a try.
>
> In MapX set the Map.NumericCoordSys property to the appropriate Lat/Long
> settings and the DisplayCoordSys to UTM (documentation on this is
confusing
>
> but more or less complete).
>
> Add a point feature in lat/lng to a layer. Then read the UTM back from the
> X/Y coords of the feature. Reverse the procedure to go the other way.
>
> When I was playing with SpatialWare from MapX, I forgot to set the
> DisplayCoordSys, so even though my data was in Albers, the X/Y I was
> reading from my point features was lat/long. I fixed my bug without
further
>
> exploring the possibilities.
>
> Good luck,
> Brad Mathews
> CTO, Cypress Technology Solutions, Inc.
> www.CypressSolutions.com
>
> Deepak Kaul wrote:
>
> Brad
>      You are right. The Map.NumericCoordSys actually lets you change the
> numeric coordinates for the map
> The NumericCoordSys represents the coordinate system used to process
> numeric map coordinates.
> To set the coordinate system (or "projection") in which the map is
> displayed, use the Map.DisplayCoordSys property.
> The NumericCoordSys property does not affect the appearance of the map.
>
> The Map.DisplayCoordSys represents the coordinate system (or "projection")
> in which the map is displayed. By default, the map's coordinate system is
> set by the geoset/ loaded layers. By modifying the map's DisplayCoordSys
> (through the CoordSys.Set method), you can display the map in another
> coordinate system.
> The Map.DisplayCoordSys property only affects the appearance of the map
>
> Here is a small code snippet which I tried to use in one of my
application.
> But while changing the Map.DisplayCoordSys - switch off all the raster
> layers prior to using the command.
>
> Private Sub mnuNumeric_Click()
>      MapXMap.NumericCoordSys.PickCoordSys
> End Sub
>
> Private Sub mnuDisplay_Click()
> Dim lyr As Layer
>     For Each lyr In MapXMap.Layers
>         If lyr.Type = miLayerTypeRaster Then lyr.Visible = False
>     Next
>      MapXMap.DisplayCoordSys.PickCoordSys
>      MsgBox " Please Use the Layer Control to Switch on the Raster Layers
> again", ,vbInformation+vbOKOnly,"Mapper"
> End Sub
>
>
> Regards
> Deepak Kaul
> RMSI, NOIDA
> INDIA
>
> Deepak Kaul also wrote:
>
> Have a look at this code snippet from the mapX hlp file
>
> Retrieving Coordinates in a Different CoordSys
>
> The following Visual Basic example changes the map's NumericCoordSys so
> that the coordinates are returned in a different coordinate system.
>
>   Dim iProjectionType As Integer
>   Dim iDatumNumber As Integer
>   Dim iUnits As Integer
>   Dim dOriginLongitude As Double
>
>   ' Display map's center X-Y in original coordsys
>
>   Debug.Print "Original Center: " & Map1.CenterX & ", " &   Map1.CenterY
>
>   ' Initialize the variables to be used by coordsys.set.
>   ' Values were obtained from the "Robinson" entry
>   ' in the file MAPINFOW.PRJ, which looks like this:
>   ' "Robinson", 12, 62, 7, 0
>
>   iProjectionType = miRobinson  '(value: 12)
>   iDatumNumber = 62             'North American 1927 (NAD 27)
>   iUnits = miUnitMeter          '(value: 7)
>   dOriginLongitude = 0
>   Map1.NumericCoordSys.Set iProjectionType, iDatumNumber, _
>   iUnits, dOriginLongitude
>
>   ' Display map's center X-Y in the new coordsys
>   Debug.Print "New Center: " & Map1.CenterX & ", " & Map1.CenterY
>
> HTH
> Deepak
>
>
> Original Question:
>
> >From: "Chris DuBuc" <[EMAIL PROTECTED]>
> >Reply-To: "Chris DuBuc" <[EMAIL PROTECTED]>
> >To: "MapInfo-L" <[EMAIL PROTECTED]>
> >Subject: MI-L Coordinate Conversion Lat/Lon to UTM
> >Date: Tue, 14 May 2002 22:01:28 -0400
> >
> >List,
> >
> >Maybe a bit off-topic, but does anybody have a recommendation for
enabling
> >a
> >VB.NET application to do coord. conversions between Lat/Long and UTM (and
> >vice-versa)?
> >
> >Here are the options I'm considering:
> >
> >1) Purchasing Blue Marble's GeoCalc OCX for about $1800 (dev. licence and
> >10
> >seats). I am leaning toward this unless somebody has a cheaper (but
simple)
> >solution.
> >
> >2) Using MapX licensed seats and writing a function to do this. There
does
> >not appear to be a straight coord. conversion method, so I assume there
> >would be some significant coding involved.
> >
> >3) Writing the math functions myself. Is the math a real bear for this
one?
> >I know there are many UTM zones to keep track of...are we talking higher
> >order equations here etc.?
> >
> >4) Other ideas?
> >
> >Thanks, and if Blue Marble is the best choice then that's a good
> >answer....I
> >just want to make sure I'm not missing anything easy and/or cheaper.
> >
> >I will summarize,
> >
> >Regards,
> >
> >Chris
> >
> >Christopher DuBuc
> >Sage Software
> >[EMAIL PROTECTED]
> >www.sagesoft.com
> >
> >
> >---------------------------------------------------------------------
> >List hosting provided by Directions Magazine | www.directionsmag.com |
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> _________________________________________________________________
> Join the world's largest e-mail service with MSN Hotmail.
> http://www.hotmail.com
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to