ftp.nice.ch/pub/next/developer/resources/classes/misckit/MiscKit.1.10.0.s.gnutar.gz#/MiscKit/Source/MiscGISKit/MiscIrelandOldUTMCoord.m

This is MiscIrelandOldUTMCoord.m in view mode; [Download] [Up]

/*======================== MiscIrelandOldUTMCoord.m =========================*/
/* MiscIrelandOldUTMCoord class contains and supports values representing
   locations in an Irish Universal Transverse Mercator coordinate system
   using the airy constants of 1953.

   DMA Release 0.8, Copyright @1993 by Genesis Project, Ltd. All Rights
   Reserved. For further information on terms and conditions see:
		Documentation/GISKit/Agreements-Legal-README

HISTORY
26-Mar-93  Dale Amon at GPL
	   Subsumed IrishGridOldUTMConstants class into this one.

21-Mar-93  Dale Amon at GPL
	   Created.
*/

#import <misckit/miscgiskit.h>

@implementation MiscIrelandOldUTMCoord

/*===========================================================================*/
/* Internal methods */
/*===========================================================================*/
/* note that we override values because the document for the Irish grid
   has values which do not match the ones calculated from their own formulae
   and constants:

                eSqrd                   n
	calculated	0.006670540605897831814	0.001673220462817007959
	book		0.00667054015           0.001673220462
*/

static id theOldIrishGrid = nil;

+ makeGrid
  {
    if (!theOldIrishGrid)
	{theOldIrishGrid = [[MiscUTMConstants allocFromZone: [self zone]]
		       initGridName: "Old Irish Grid"
			 trueOrigin: 53.5 : -8.0
			     inGrid: 200000.0    : 250000.0
			   onSphere: 6377340.189 : 6356034.446
	     centralMeridianScaling: 1.000035];

	 [theOldIrishGrid override_eSqrd: 0.00667054015 n: 0.001673220462];
	 [theOldIrishGrid setProtected];
	}
    return theOldIrishGrid;
  }


/*===========================================================================*/
/* Initialization methods. If we don't already have a UTM constants object
   for the Old Irish Grid, create one instance that all will share and that
   cannot be deleted.

   Values are from the Irish Ordinance Survey document, "Tables for the
   Transverse Mercator Projection of Ireland", 1953, reprinted 1971.

*/
/*===========================================================================*/
/* DESIGNATED INITIALIZER */

-initDescription: (char *) txt
 {
    [super initDescription: txt constants: [MiscIrelandOldUTMCoord makeGrid]];

    /* over ride the standard converter */
    converter = [MiscIrelandCoordConverter new];
    return self;
 }


/*---------------------------------------------------------------------------*/
/* Block the designated initializer of our parent class */

-initDescription: (char *) txt constants: anObject
 {	[self error:"  %s class should not be sent '%s' messages\n",
            [[self class] name], sel_getName(_cmd)];
	return self;
 }


/*===========================================================================*/
/* Archive methods */
/*===========================================================================*/
- awake
{	[super awake];
	[constants setUnprotected];
	[constants free];
	[MiscIrelandOldUTMCoord makeGrid];
	return self;
}

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.