<?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 Re: Geography data type issues. in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694470#M39460</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Like Vince said, it looks as if your data is stored using the Geometry type rather than the Geography type. In the case of Geometry you'd use the STX and STY methods to get the individual coordinates of each point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can check the properties of your feature class in ArcCatalog to see what the underlying spatial type is, or you can query directly to SQL Server like this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;select data_type from information_schema.columns where TABLE_NAME = &amp;lt;your_table&amp;gt; and COLUMN_NAME = 'shape'&lt;/SPAN&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Shannon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2013 17:36:02 GMT</pubDate>
    <dc:creator>ShannonShields</dc:creator>
    <dc:date>2013-03-15T17:36:02Z</dc:date>
    <item>
      <title>Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694464#M39454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to get&amp;nbsp; Lat/Long values back from the Geography filed on my SQL Server 2008 R2;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select [Shape].Lat, [Shape].Long FROM [sde].[sde].[Teste]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And I got this error message:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Msg 6506, Level 16, State 10, Line 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Could not find method 'Lat' for type 'Microsoft.SqlServer.Types.SqlGeometry' in assembly 'Microsoft.SqlServer.Types'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you guys have any idea of what is going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Felipe&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 18:55:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694464#M39454</guid>
      <dc:creator>MarceloGomes</dc:creator>
      <dc:date>2013-03-13T18:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694465#M39455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Microsoft documents the accessor functions for their GEOMETRY and GEOGRAPHY types.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I doubt GEOMETRY supports Lat or Long requests (these are Geography properties).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps if you use a cast...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 20:05:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694465#M39455</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-03-13T20:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694466#M39456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Perhaps if you use a cast...&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My field is GEOGRAPHY...and what king of cast??&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm a beginner in SQL Server.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 12:22:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694466#M39456</guid>
      <dc:creator>MarceloGomes</dc:creator>
      <dc:date>2013-03-15T12:22:47Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694467#M39457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The SQL-Server error reports the column is "SqlGeometry."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A Microsoft forum would likely be of more use on this topic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: Once you get the issue resolved, though, you'll want to follow best practice&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and remove all user data owned by the 'sde' login/user/schema, and instead&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;create multiple logins/users/shemas and roles to own and manage data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The 'sde' user should be exclusively reserved for geodatabase administration --&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;allowing the 'sde' user to own GIS tables can result in corruption of the entire&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;geodatabase (especially as a database/ArcSDE novice).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 13:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694467#M39457</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-03-15T13:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694468#M39458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks VAngelo for the help..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Shape field was created automaticaly by the ArcGis export to server(Single) tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And i don't know what to do to get this values.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 15:19:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694468#M39458</guid>
      <dc:creator>MarceloGomes</dc:creator>
      <dc:date>2013-03-15T15:19:02Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694469#M39459</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Unless you modififed the DBTUNE environment, it's not a GEOGRAPHY, it's a GEOMETRY&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; in the table (which are distinct types in SQL-Server).&amp;nbsp; Only a Geography type supports the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Lat and Long methods, so if you want to use those methods, you'd need to cast the column &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in the SQL query (for each term).&amp;nbsp; I'm not familiar with that particular syntax, but I'm sure&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; a search on "cast SqlGeometry as SqlGeography" will get you started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 15:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694469#M39459</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-03-15T15:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694470#M39460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Like Vince said, it looks as if your data is stored using the Geometry type rather than the Geography type. In the case of Geometry you'd use the STX and STY methods to get the individual coordinates of each point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can check the properties of your feature class in ArcCatalog to see what the underlying spatial type is, or you can query directly to SQL Server like this: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;"&gt;select data_type from information_schema.columns where TABLE_NAME = &amp;lt;your_table&amp;gt; and COLUMN_NAME = 'shape'&lt;/SPAN&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Shannon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 17:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694470#M39460</guid>
      <dc:creator>ShannonShields</dc:creator>
      <dc:date>2013-03-15T17:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694471#M39461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The spatial type is GEOMETRY.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Using the STX and STY i got these values back -5056571,984 and -2707830,6178.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Vangelo, how do i modify the DBTUNE?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for helping me guys!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 19:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694471#M39461</guid>
      <dc:creator>MarceloGomes</dc:creator>
      <dc:date>2013-03-15T19:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694472#M39462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you didn't get back decimal degrees from GEOMETRY, a cast isn't going to help&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(nor is changing the geometry&amp;nbsp; type).&amp;nbsp; There are dozens of ways to extract Lat/Lon&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;values, with or without ArcGIS.&amp;nbsp; Before you can deproject, you uneed to know what&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; your source projection and geodetic datum are (a new thread on deprojection&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;would be more appropriate than morphing this one -- be sure you specify the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;software you have available along with the existing coordinate sysstem in your&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;initial post).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;A google on "how&amp;nbsp; do i modify the dbtune" returns over 5000 hits, and the first five&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;all look like they'll answer your question.&amp;nbsp; These Forums are really for when the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;documentation *doesn't* meet your needs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- V&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 23:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694472#M39462</guid>
      <dc:creator>VinceAngelo</dc:creator>
      <dc:date>2013-03-15T23:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Geography data type issues.</title>
      <link>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694473#M39463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;To keep things easy we exported all the x,y from the geodatabase and added two columns to the sql table and populated them.&amp;nbsp; Once we had all the data we needed in SQL.&amp;nbsp; I ran the following sql commands:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ALTER TABLE Facility ADD SHAPE Geometry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CREATE SPATIAL INDEX Spatial_Index ON Facility(Shape) USING GEOMETRY_GRID&amp;nbsp; WITH ( BOUNDING_BOX = ( 0, 0,1000000 , 1000000 ))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UPDATE Facility SET shape = geometry::STPointFromText('POINT(' + convert(varchar,x_coord) + ' ' + convert(varchar, y_coord) + ')', 2954)&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;SELECT shape.STX as X_coord, shape.STY as Y_Coord, shape.STSrid as SRID from facility&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Mar 2013 15:02:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/geography-data-type-issues/m-p/694473#M39463</guid>
      <dc:creator>MikeSmith7</dc:creator>
      <dc:date>2013-03-27T15:02:40Z</dc:date>
    </item>
  </channel>
</rss>

