<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to check if spatial reference system is GCS or PCS? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-check-if-spatial-reference-system-is-gcs-or/m-p/593276#M15969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for an application I have to get the unit of the coordinate system of a featureClass. (I'm using VBA)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I do is: I take the layer with the FeatureClass. Then give the Layer to IGeoDataset. The Reference System of the dataset I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem. Finaly i get the unit from IUnit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is: Bevor I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem, I have to know, if it is a GCS or a PCS. Otherwise I get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't find out how I can check this before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone of you have an idea?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Dec 2010 21:25:45 GMT</pubDate>
    <dc:creator>PaulSchmidt1</dc:creator>
    <dc:date>2010-12-15T21:25:45Z</dc:date>
    <item>
      <title>How to check if spatial reference system is GCS or PCS?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-check-if-spatial-reference-system-is-gcs-or/m-p/593276#M15969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for an application I have to get the unit of the coordinate system of a featureClass. (I'm using VBA)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I do is: I take the layer with the FeatureClass. Then give the Layer to IGeoDataset. The Reference System of the dataset I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem. Finaly i get the unit from IUnit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My problem is: Bevor I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem, I have to know, if it is a GCS or a PCS. Otherwise I get an error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I didn't find out how I can check this before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone of you have an idea?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Dec 2010 21:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-check-if-spatial-reference-system-is-gcs-or/m-p/593276#M15969</guid>
      <dc:creator>PaulSchmidt1</dc:creator>
      <dc:date>2010-12-15T21:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to check if spatial reference system is GCS or PCS?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-check-if-spatial-reference-system-is-gcs-or/m-p/593277#M15970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi,&lt;BR /&gt;for an application I have to get the unit of the coordinate system of a featureClass. (I'm using VBA)&lt;BR /&gt;&lt;BR /&gt;What I do is: I take the layer with the FeatureClass. Then give the Layer to IGeoDataset. The Reference System of the dataset I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem. Finaly i get the unit from IUnit.&lt;BR /&gt;&lt;BR /&gt;My problem is: Bevor I pass to IGeographicCoordinateSystem or IProjectedCoordinateSystem, I have to know, if it is a GCS or a PCS. Otherwise I get an error.&lt;BR /&gt;&lt;BR /&gt;I didn't find out how I can check this before.&lt;BR /&gt;&lt;BR /&gt;Does anyone of you have an idea?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should be able to use something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf pSpatialReference Is IGeographicCoordinateSystem Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox "GeographicCoordinateSystem"
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf pSpatialReference Is IUnknownCoordinateSystem Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox "UnknownCoordinateSystem"
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; If TypeOf pSpatialReference Is IProjectedCoordinateSystem Then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MsgBox "ProjectedCoordinateSystem"
&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Melita&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-check-if-spatial-reference-system-is-gcs-or/m-p/593277#M15970</guid>
      <dc:creator>MelitaKennedy</dc:creator>
      <dc:date>2021-12-12T01:28:33Z</dc:date>
    </item>
  </channel>
</rss>

