日本語
バグ番号 NIM100236
送信済み Mar 26, 2014
Modified Jun 11, 2020
重要度 High
対象ビュー: ArcGIS for Desktop
見つかったバージョン 10.2.1
プログラム言語 All
サーバー プラットフォーム
クライアントのプラットフォーム
データベース N/A
ロケール N/A
ステータス Not in Current Product Plan
バージョンの修正内容
修正済みの 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