Select to view content in your preferred language

I want to get the length of features in different units from the source data.

1972
0
04-11-2011 11:02 AM
OvidioRivero
Emerging Contributor
I have a feature class stored in ST_Geometry in Oracle.  The feature class is in GCS_WGS_1984 and I need to get the lengths of the features in miles.  Has anyone accomplished this using st_geometry functions?

I can easily get the length of a line using st_length but cannot get the length in miles unless I reproject the feature class.  I am trying to avoid that because I dont want to duplicate data in our system.


I would like to be able to do something like this:


select  sde.ST_TRANSFORM((sde.st_length(b.shape)),27)
from ALL_LINES b
where rownum < 11

I get this error when I try it:

Error starting at line 3 in command:
select  sde.ST_TRANSFORM((sde.st_length(b.shape)),27)
from ALL_LINES b
where rownum < 11
Error at Command Line:3 Column:12
Error report:
SQL Error: ORA-29900: operator binding does not exist
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ST_TRANSFORM'
29900. 00000 -  "operator binding does not exist"
*Cause:    There is no binding for the current usage of the operator.
*Action:   Change the operator arguments to match any of the existing
           bindings or add a new binding to the operator.


Another method I am trying is 1) adding a column called LENGTH_METERS, 2) reproject the Feature class in ArcMAp 3) Use the calculate geometry tool to populate the new field.  However this method is extremely slow since the feature class has millions of rows.


Thanks,
0 Replies