|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | Re: GISList: Getting XY out of Oracle Spatial |
| Date: |
02/13/2002 07:37:18 AM |
| From: |
Chris Faulkner |
|
|
Hi
It depends what environment you are in and whether you are after elements of sdo_ordinates or sdo_point. If it's point data (your sdo_gtype is 2001, 3001, etc) then the following will get your x and y in a simple format in SQLplus where your spatial field is called "geometry".
select a.geometry.sdo_point.x , a.geometry.sdo_point.y from table a:
The sdo_ordinate list of coordinates for more complex features is in a VARRAY within the sdo_geometry object so if you are after the elements of this, then I think it's best to create some wrapper (in PL/SQL,Java). You make the selection of the field, fetch it into your own VARRAY variable and, loop this and output the elements as you want. An example of fetching and using VARRAYS in a JDBC environment is at the following URL. Whilst this example has nothing to do with Spatial specifically, it is about fething complex objects which is what sdo_geometry is.
http://otn.oracle.com/doc/java.815/a64685/oraext7.htm#1040060
You may have to be registered on Oracle technet to access this.
Chris Faulkner Oramap Ltd
>Hi all, > >I´m wondering does anyone know how te get xy-coordinates out of the >sdo_geometry field into normal number fields. >Thanks > >Jan Willem van der Lichte > > > >To unsubscribe, write to gislist-unsubscribe@geocomm.com >________________________________________________________________________ >Setup a GeoCommunity Account and have access to FAST DataDownloads >and Premium Career Posting at a discounted rate! >https://www.geocomm.com/cgi-bin/accounts/login > >On-line Archives available at >http://spatialnews.geocomm.com/community/lists/ > >
To unsubscribe, write to gislist-unsubscribe@geocomm.com ________________________________________________________________________ Setup a GeoCommunity Account and have access to FAST DataDownloads and Premium Career Posting at a discounted rate! https://www.geocomm.com/cgi-bin/accounts/login
On-line Archives available at http://spatialnews.geocomm.com/community/lists/
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|