Geometry Fields - Shape.length vs Shape.STLength() in ArcGIS

7590
4
Jump to solution
08-15-2014 06:02 AM
Highlighted
Occasional Contributor III

So I've been looking for a good explanation of the difference between how Shape.len or Shape.len and Shape.STLength() is handled in ArcGIS. If anyone can confirm or correct the following for me and explain them better I invite you to do so.

 

Here is what I believe I know:

  • Both are automatically calculated geometry fields
  • Both fields are permanent and cannot be removed
  • Shape.len/Shape.length is calculated by ArcGIS while Shape.STLength() is calculated by Microsoft SQL Server or another DBMS
  • Shape.STLength() wasn't used by ArcSDE up until a recent upgrade, because it wasn't until our recent upgrade to 10.2 when we started experienceing issues.
  • Because Shape.STLength() is not calculated by Esri, ArcGIS for Mobile and ArcPad both have difficulties with the field because it also cannot be null.
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Esteemed Contributor

You can do this by exporting the dbtune table, updating the DEFAULTS keyword to use SDEBINARY, and then re-import the dbtune table.  Ex:

1.  Export the dbtune table using command line:

C:\>sdedbtune -o export -f c:\temp\dbtune.sde -u sde -p sde -i sde:sqlserver:<server name> -D <database name>

2.  Open the dbtune.sde file in a text editor

3.  Under ##DEFAULTS, change the GEOMETRY_STORAGE parameter from "GEOMETRY" to "SDEBINARY"

4.  Save your changes

5.  Re-import the dbtune.sde file using command line:

C:\>sdedbtune -o export -f c:\temp\dbtune.sde -u sde -p sde -i sde:sqlserver:<server name> -D <database name>

Note:  this will not update existing feature classes.  You can use the Migrate Storage tool to do this.

View solution in original post

Reply
0 Kudos
4 Replies
Highlighted
Esri Esteemed Contributor

Hi Gregg,

If you are using SQL Server, you may want to try using the SDEBINARY geometry type rather than the default GEOMETRY type.  Performance is usually faster, and the length will be in a field called 'Shape.len', so you may not experience any issues with ArcGIS for Mobile or ArcPad.

Reply
0 Kudos
Highlighted
Occasional Contributor III

That is what I am looking for, I think. Could you point me in the direction of configuring SQL server to use SDEBINARY?

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

You can do this by exporting the dbtune table, updating the DEFAULTS keyword to use SDEBINARY, and then re-import the dbtune table.  Ex:

1.  Export the dbtune table using command line:

C:\>sdedbtune -o export -f c:\temp\dbtune.sde -u sde -p sde -i sde:sqlserver:<server name> -D <database name>

2.  Open the dbtune.sde file in a text editor

3.  Under ##DEFAULTS, change the GEOMETRY_STORAGE parameter from "GEOMETRY" to "SDEBINARY"

4.  Save your changes

5.  Re-import the dbtune.sde file using command line:

C:\>sdedbtune -o export -f c:\temp\dbtune.sde -u sde -p sde -i sde:sqlserver:<server name> -D <database name>

Note:  this will not update existing feature classes.  You can use the Migrate Storage tool to do this.

View solution in original post

Reply
0 Kudos
Highlighted
Occasional Contributor III

Thanks a bunch, Jake. I'll look into changing to SDEBINARY. Hopefully this fixes our issue with Mobile and ArcPad.

Reply
0 Kudos