漏洞编号 | NIM100236 |
已提交 | Mar 26, 2014 |
Modified | Mar 30, 2022 |
严重性 | High |
应用于 | ArcGIS for Desktop |
找到的版本 | 10.2.1 |
程序语言 | All |
服务器平台 | |
客户端平台 | |
数据库 | N/A |
区域设置 | N/A |
状态 |
Known Limit
Learn more |
修正版本 | |
SP 修复 |
漏洞 NIM100236
摘要
The IGeographicCoordinateSystemEdit.Define method fails on defined spatial references, and is making the geographic system object with empty properties.
附加信息
Projecting a point from one GCS to another normalizes coordinates to +-180 range (left longitude + 360)
备用解决方案
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