Provides access to members that create different kinds of spatial reference components. Note: the ISpatialReferenceFactory interface has been superseded byISpatialReferenceFactory3. Please consider using the more recent version.
|CreateDatum||Creates a predefined datum.|
|CreateESRISpatialReference||Creates a spatial reference system and defines it from the specified ESRISpatialReference buffer.|
|CreateESRISpatialReferenceFromPRJ||Creates a spatial reference from a PRJ string.|
|CreateESRISpatialReferenceFromPRJFile||Creates a spatial reference from a PRJ file.|
|CreateGeographicCoordinateSystem||Creates a predefined geographic coordinate system.|
|CreateGeoTransformation||Creates a predefined transformation between geographic coordinate systems.|
|CreateParameter||Creates a predefined parameter.|
|CreatePredefinedAngularUnits||Creates a list of predefined angular units.|
|CreatePredefinedDatums||Creates a list of a list of predefined datums.|
|CreatePredefinedLinearUnits||Creates a list of predefined linear units.|
|CreatePredefinedPrimeMeridians||Creates a list of predefined prime meridians.|
|CreatePredefinedProjections||Creates a list of predefined projections.|
|CreatePredefinedSpheroids||Creates a list of predefined spheroids.|
|CreatePrimeMeridian||Creates a predefined prime meridian.|
|CreateProjectedCoordinateSystem||Creates a predefined projected coordinate system.|
|CreateProjection||Creates a predefined projection.|
|CreateSpheroid||Creates a predefined spheroid.|
|CreateUnit||Creates a predefined unit of measure.|
|ExportESRISpatialReferenceToPRJFile||Exports a spatial reference to a PRJ file.|
CoClasses that implement ISpatialReferenceFactory
|CoClasses and Classes||Description|
|SpatialReferenceEnvironment||Creates various spatial reference objects.|
The ISpatialReferenceFactory interface provides methods that use the FactoryCode to generate predefined factory spatial reference objects. There are three types of functions on this interface: those that return single objects, those that return a set of objects of the same type, and those that are used to import and export SpatialReference objects to and from a PRJ file or a PRJ string representation. For example, the CreateGeographicCoordinateSystem function takes as its only parameter an integer that represents the FactoryCode of a predefined geographic coordinate system. The function returns a GCS whose coordinate system has been defined. Its coordinate grids and tolerance, though, have not yet been defined.
Thousands of coordinate system related objects are available through the esriSR... enumerations. To maintain compatibility between versions, each object, such as a geographic coordinate system, will have more than one enumeration. Use the enumeration elements (for example, esriSRGeoCS_WGS1984) rather than the integer value it represents. Many of the FactoryCode values are based on an external standard and the values may change.
The next type of function on the ISpatialReferenceFactory interface returns a complete Set of objects. These type of functions are useful for developers who may wish to populate a pulldown selection list of available SpatialReference objects.
The third type of function supported by ISpatialReferenceFactory deals with PRJ files and strings. CreateESRISpatialReferenceFromPRJFile takes an old or new style PRJ file and creates either a geographic or projected coordinate system from it, depending on the file contents. The old style PRJ is used with coverages, TINs, and GRIDs. CreateESRISpatialReferenceFromPRJ is used to create a SpatialReference based on the string buffer of an old style PRJ file. While CreateESRISpatialReference is similar, the string buffer must be in the format of a new PRJ file. Conversely, the ExportESRISpatialReferenceToPRJFile function provides a mechanism to take a SpatialReference object and create a new style PRJ file from it. These four functions provide you with a way to take advantage of existing routines that involve the use of PRJ files. They also provide an easy and effective way to exchange spatial reference information through the use of text files. If you plan to work with vertical coordinate systems, use the ISpatialReferenceFactory3 versions of these methods.