Bug-Nummer | NIM100236 |
Erzeugt am | Mar 26, 2014 |
Modified | Mar 30, 2022 |
Schweregrad | High |
Übernehmen für | ArcGIS for Desktop |
Gefundene Version | 10.2.1 |
Progr.-Sprache | All |
Server-Plattform | |
Client-Plattform | |
Datenbank | n. z. |
Gebietsschema | n. z. |
Status |
Known Limit
Learn more |
Behoben in Version | |
SP Fixed |
Bug NIM100236
Zusammenfassung
The IGeographicCoordinateSystemEdit.Define method fails on defined spatial references, and is making the geographic system object with empty properties.
Zusätzliche Informationen
Projecting a point from one GCS to another normalizes coordinates to +-180 range (left longitude + 360)
Alternative Lösung
Use the Define method on a new geographic coordinate system object. This does not make the properties blank.
Sample Code:
Public Sub CustomGCS()
'create a new spatial regernce factory
Dim pSRF As ISpatialReferenceFactory2
Set pSRF = New SpatialReferenceEnvironment
'create a new WGS 1984 coordinate system for providing inputs
Dim pInPutGC As IGeographicCoordinateSystem2
Set pInPutGC = pSRF.CreateGeographicCoordinateSystem(esriSRGeoCS_WGS1984)
'create a new geographic coridnate system
Dim pOutputGC As IGeographicCoordinateSystem2
Dim pGCS As IGeographicCoordinateSystemEdit
Set pOutputGC = New GeographicCoordinateSystem
'set the new coordinate system to IGeographicCoordinateSystemEdit to define custom projections
Set pGCS = pOutputGC
'Define custom projection by providing inputs
pGCS.Define <a href="http://pInPutGC.Name" target="_blank">pInPutGC.Name</a>, pInPutGC.Alias, pInPutGC.Abbreviation, pInPutGC.Remarks, pInPutGC.Usage, pSRF.CreateDatum(esriSRDatumType.esriSRDatum_Abidjan1987), pInPutGC.PrimeMeridian, pInPutGC.CoordinateUnit
Debug.Print "START"
Debug.Print <a href="http://pOutputGC.Name" target="_blank">pOutputGC.Name</a>
Debug.Print pOutputGC.Abbreviation
Debug.Print pOutputGC.Alias
Debug.Print pOutputGC.CoordinateUnit.FactoryCode
Debug.Print pOutputGC.Datum.FactoryCode
Debug.Print pOutputGC.FactoryCode
Debug.Print pOutputGC.LeftLongitude(True)
Debug.Print pOutputGC.PrimeMeridian.FactoryCode
Debug.Print pOutputGC.RightLongitude(True)
Debug.Print "END"
End Sub