Latitude/Longitude on Oracle Locator
Hi, I'm using Oracle Locator
I'm trying to select latitude and longitude through this query
SELECT t.X AS LATITUDE, t.Y AS LONGITUDE
FROM geo.cultura c,
TABLE(SDO_UTIL.GETVERTICES(c.geometry)) t;
but the numbers are coming from different 90 and -90
A example: X=343819,495658682 and Y=7382918,56758273
Is there a command to convert those numbers?
Thank you very much!
Hi,
SDO_UTIL.GETVERTICES returns the coordinates of the vertices of the geometry. If your coordinate system is other than geodetic coordinates then you need transformation.
For example
SELECT t.X AS LATITUDE, t.Y AS LONGITUDE
FROM spl_major_villages c,
TABLE(SDO_UTIL.GETVERTICES(SDO_CS.TRANSFORM(c.geom, 0.005, 8307))) t;
Sujnan
Similar Messages
-
Converting from UTM meter to latitude,longitude in oracle
I am trying to write a procedure which takes in utm data and converts to latitude,longitude
mostly on the net i am getting some formulas for conversion with no proper explanation.
Can any of you suggest any previously written oracle procedure or other help.
UTM data is available in a column, i convert the data into lat,long and take the lat
from easting in deg,minustes,seconds and likewise longitude from northing.
there are some methods like using excel or in java, but i want to do it in Oracle.
Please help as i am looking for suggestions and help.Hi,
you should ask in the SPATIAL forum. This is a spatial conversion and Oracle has functions for these. In the SPATIAL forum there are the experts (I'm not).
See Spatial
Herald ten Dam
http://htendam.wordpress.com -
Trying to use Oracle Locator for latitude and longitude proximity searches
I am prototyping using Oracle Locator to do proximity searches and other spatial operations within the database in our software products. I’ve got it working fine in SQL Server, where geodetic is built in as well as geometric features, but with Oracle we’re trying to restrict ourselves to the Locator features so our customers are forced to buy the add-on. I am getting perplexing results, as you can see if you run the little test program I wrote.
I am using lat and long as the point coordinates. I am inserting the data using
SDO_GEOMETRY(2001, 4326, SDO_POINT_TYPE(?, ?, null), null, null
Then I am doing the search with
SELECT pointname, SDO_NN_DISTANCE (1) distance_in_miles
FROM geotest g
WHERE SDO_NN(g.geopoint, sdo_geometry(2001, 4326, SDO_POINT_TYPE(38.683, 123.083, NULL), NULL, NULL), 'distance=1000 unit=mile', 1) = 'TRUE'
ORDER BY distance_in_miles
I am getting distances from 56 to 86 units, whatever the units are.
Am I attempting the impossible with Locator, to use lat and long and then expect the sdo_nn function to work in miles?
Select results:
POINTNAME DISTANCE_IN_MILES
Point number 19 56.8497254738894
Point number 17 57.0758802885512
Point number 5 62.096857977487
Point number 3 67.3555572959989
Point number 16 70.8005407529483
Point number 1 73.0370426667902
Point number 9 73.1047740624495
Point number 14 73.1451566004902
Point number 11 74.9344307572887
Point number 10 75.3710529989389
Point number 2 75.423714095366
Point number 8 77.2121183101138
Point number 4 77.6458963754559
Point number 18 80.4569749046142
Point number 6 81.0025026191188
Point number 20 81.8444977200089
Point number 13 83.4095236051998
Point number 15 86.9333533902019
Point number 7 88.9312783958262
Point number 12 98.72957787982
Point number 0 98.9999489634554
21 rows selectedCouple of things that we found out using sdo_nn here...
It works...but the knobs need to be turned in the right order...
You may have done this already...but here is what we have...
a. we create our table containing the location sdo_geometry column ..( in our case the column is called location )
b.We loaded the data..If you elected to use a partitioned table for your spatial data and created the corresponding spatial index as local...your sql will need to account for that.if your index is global ..don't worry about it
c. We inserted the metadata...this needs to be done once per table...by either the dba or the schema owner...
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('<YOUR TABLE NAME>', '<SPATIAL COLUMN NAME>',
MDSYS.SDO_DIM_ARRAY
(MDSYS.SDO_DIM_ELEMENT('LONGITUDE', -180.0, 180.0, 0.5),
MDSYS.SDO_DIM_ELEMENT('LATITUDE', -90.0, 90.0, 0.5)
8307);
COMMIT;
If this is not done before the spatial index is created...stuff won't work...
d. create your spatial index
e. our query looked something like this...( I changed the table names )
This returns the top 30 results sorted by distance in feet...
SELECT LOCATION_KEY,
result_center_distance
FROM
SELECT LOCATION_KEY,
SDO_NN_DISTANCE(1) result_center_distance
FROM LOCATION_OWNER.D_LOCATION dlocation
WHERE SDO_NN(dlocation.LOCATION,
MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(-97.07845,33.138006,null),null,null), 'SDO_NUM_RES=31 unit=FOOT distance=5800.0 SDO_MAX_MEMORY=50000000', 1) = 'TRUE'
ORDER BY 2
WHERE ROWNUM <= 31
We had to use this structure because our index is local...and sdo_nn will return the sdo_num_res results for each partition...so you need to get the results first..then treat it as a top-n query...
If you index is global...this should work
SELECT LOCATION_KEY,
SDO_NN_DISTANCE(1) result_center_distance
FROM LOCATION_OWNER.D_LOCATION dlocation
WHERE SDO_NN(dlocation.LOCATION,
MDSYS.SDO_GEOMETRY(2001,8307,MDSYS.SDO_POINT_TYPE(-97.07845,33.138006,null),null,null), 'SDO_NUM_RES=31 unit=FOOT distance=5800.0 SDO_MAX_MEMORY=50000000', 1) = 'TRUE'
ORDER BY 2
If you want the distance in MILE...replace FOOT by MILE...
good luck...
Edited by: user5431290 on Oct 23, 2011 9:36 AM -
STEPS TO CONVERT LATITUDES AND LONGITUDES INFORMATION INTO LOCATIONS URGENT
Hi
can anyone give me the sequence of steps about converting GPS information that is latitudes , longitudes into locations..
The problem is i will give input as latitudes and longitudes ,,i should get location ..
i need help regarding
1)which api to be used
2) any maps are required or notIf you are talking about converting lat and long to x and y, there's plenty of information available around the web. If you are talking about mapping this data to addresses you pretty much need to do some service for that like deepspace suggested.
-
Oracle Locator - Implementation
I have a need to calculate shortest distance between any two locations (addresses) using Oracle Locator. The only parameters that are available to me as inputs are the 5 digit zip code, latitude and longitude of the location. I am looking for help in implementing a solution. I have the 10g enterprise database that comes with Locator as standard.
Wellllll
My first guess is that you need a bit more than just those pieces. When you say 'shortest distance' are you expected to get that by route or as the crow files?
You may want to check in the 'Spatial' forum where this kind of thing is likely to be discussed in much more depth (as the Spatial and Locator specialists tend to hang out there).
There are subtle differences between 10gR1 and 10gR2 - which in particular are you using?
Do you know the coordinate system? Long/Lat comes in a variety of subtly-different flavours, depending on the actual coordinate system. (Since you mention zip code, I assume you mean the US, and 8302 will probably do reasonably well.)
You will probably want to create a spatial index and defnitely need to create the user_sdo_geom_metadata for your layer.
Have you looked in the Spatial Reference manual in the Oracle docco? Specifically at the Locator appendix, which describes exactly what parts of Spatial you can use in Locator. And at the sdo_distance function and examples at http://download-west.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_objgeom.htm#i857957 -
CONVERTING X,Y TO LATITUDE,LONGITUDE VICE VERSA
hi,
i need formula for converting x,y coordinates to latitude ,longitude and vice versa,
CAN ANYBODY HELP ME IN THIS?There is no standard formula for such conversions, as converting from one coordinate system to another is often a complex mathematical formula. What you need to do is track down (via the internet) the mathematical formula you require for your conversion and then apply that formula as SQL or PL/SQL code. You can pretty much do any mathematics in Oracle code, but firstly you need to know the maths required (and so would we if you expect us to help you).
-
What are the requirements for Oracle Locator?
Hi, when installing a new database, we want to trim out the stuff that Oracle installs by default that we don't absolutely need. However, we do want to make use of the MDSYS.SDO_GEOMETRY type and Oracle Locator (not Spatial).
Oracle has all these different components, and we jut found out that in order to use Locator, you have to install Oracle interMedia. Is there anything else there that Locator has a dependency on that we would be missing? We intend to install these:
Oracle Workspace Manager
Oracle Enterprise Manager
Oracle Database Catalog Views
Oracle Database Packages and Types
But out of the list of the rest of them, what is needed for Oracle Locator?
Spatial
Oracle interMedia
OLAP Catalog
Oracle XML Database
Oracle Text
Oracle Expression Filter
Oracle Rules Manager
Oracle Workspace Manager
Oracle Data Mining
Oracle Database Catalog Views
Oracle Database Packages and Types
JServer JAVA Virtual Machine
Oracle XDK
Oracle Database Java Packages
OLAP Analytic Workspace
Oracle OLAP APIOracle Locator is implemented in the MDSYS userid. (It's included in every version and edition of the database since 8i, including 10gR2 Express Edition.)
As you have noted, Locator is considered part of intermedia. (In some versions of Oracle, Locator is officially a feature of intermedia, in others it seems to be independent. In all versions, it uses a commono install with intermedia.) The install for intermedia 10gR2 is described at http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14302/ap_instl_upgrd.htm#sthref649
I believe there are some Locator funtions in 10gR2 that are impemented in Java and require the JVM. The 10gR2 Express Edition (XE) does not include JVM and Locator seems to be mostly functional, but there are areas that do not work.
Technically you do not need Oracle Text or Oracle XDK/XMLDB. I've found they are extremely useful so I do include them in my minimum installs. They are also included in XE.
In your list the following are related to separately licensed EE options: Spatial, OLAP and Data Mining -
Using Mapviewer with Oracle Locator
We're currently using Oracle Locator as a datasource for Mapviewer 10g and we're running into a slight problem when loading simple points from a table. We have the table containing these ponits added to the USER_SDO_GEOM_METADATA table and the spatial index is created on the specific column with the SDO_GEOMETRY type. When the map loads up the following error is generated when a dynamic jdbc query is run:
MAPVIEWER-06009: Error processing an FOI request.
Root cause:FOIServlet:ORA-29900: operator binding does not exist
ORA-06540: PL/SQL: compilation error
ORA-06553: PLS-907: cannot load library unit MDSYS.SDO_3GL (referenced by MDSYS.SDO_FILTER)
I've looked in the database for the MDSYS.SDO_3GL object and it's definitely there, so I'm a little lost on what could be causing this. I thought perhaps that our user schema may not have execute privileges associated with that specific procedure, but I believe the entire point of MDSYS is that it's available to any user on the database.
Any help with this would be greatly appreciated.
Edited by: user1175540 on Oct 29, 2010 7:10 PMWe're currently using the javascript api for oracle maps (using the matching javascript file, oraclemaps.js, that came directly from the mapviewer application download). All that I'm calling is a single table and then getting some hidden info columns as well off of it too. I've tried this on a different schema and database that's also only running Locator and the query runs just fine with the points on the map displaying as intended.
Here's the current theme request that I'm submitting:
<theme name= 'lowerTheme' >
<jdbc_query spatial_column='GEOMETRY' jdbc_srid='8307' render_style= 'V.AVCD_BUILD' datasource='mvdemo' >
select * from build where subtype in('ABC','123','DEF')
<hidden_info>
<field column='SUBTYPE' name='Type'/>
<field column='NAME' name='Name'/>
<field column='ADDR' name='Address'/>
<field column='CITY' name='City'/>
<field column='STATE' name='State'/>
<field column='ZIP_CODE' name='ZIP Code'/>
</hidden_info>
</jdbc_query>
<rendering>
<style name='V.AVCD_BUILD' value_columns='SUBTYPE'/>
</rendering>
</theme>
Within the actual function adding that theme to the 'mapview' variable I'm creating a new MVThemeBasedFOI object using the name 'lowerTheme' and the above definition for the second parameter in the constructor.
Is there a listing of procedures on the MDSYS schema that I should check to make sure they're valid for spatial queries to work?
Thanks in advance for the help. -
Oracle LOCATOR - Standard Edition
Hello,
Can you please to tell me if there is any customer using Oracle Locator with Standard Edition?
Regards,
AndreThere are indeed may success stories for Locator.
Appendix B Oracle Locator of the manual deals with the differences .... here is the headline info
Oracle Locator (also referred to as Locator) is a feature of Oracle Database 11g Standard Edition. Locator provides core features and services available in Oracle Spatial. It provides significant capabilities typically required to support Internet and wireless service-based applications and partner-based GIS solutions. Locator is not designed to be a solution for geographic information system (GIS) applications requiring complex spatial data management. If you need capabilities such as linear referencing, advanced spatial functions, or Spatial Web services, use Oracle Spatial instead of Locator.
Yours sincerely
Rich -
How do i find coordinates (latitude longitude) of a particular place or my position using my iPad2.
It shows the current position but cant it tell cordinates as well.Get this app http://itunes.apple.com/jm/app/lat-long/id425984240?mt=8
Cheers, Tom -
Is there any alternative for SDO_RELATE in Oracle Locator [not in spatial!]
Hi,
We are looking alternative arrangement in place of SDO_RELATE function in oracle Locator i.e. which is free and has no bindings with oracle spatial license.
e.g. http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/55/oracle-locator-vs-enterprise-licensing-the-sdogeom-package/
Any information will be great help on this.
Thanks in advance!!Hi,
You are allowed to use the sdo_relate operator in locator. You are not allowed to use sdo_geom.relate function in locator.
Look [Table B-1|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_locator.htm#CFACCEEG] in the [Oracle Spatial Developers Guide 11g Release 1|http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/toc.htm].
Yavuz -
Gentelman,
How can i use SDO_INSIDE in oracle locator in 9i
regards
AbhijitHi Baris,
thanks for the information. I applied the sql below
but errors are thrown
SELECT customer_id
FROM CUSTOMER
WHERE SDO_INSIDE(cust_geo_location,sdo_geometry(2001,
8307, sdo_point_type(-63.13631, 52.485424,
NULL),NULL,NULL)) = 'TRUE'
ORA-00904 invalid identifier SDO_INSIDE
what can be the reason
regards and thanks
AbhijitHi Abhijit,-
Please read what i have pointed to in my previous post in this thread. you will see that it is the relate function. One parameter is "inside" keyword.
hope this helps,
best regards,
baris -
Oracle Locator or Spatial?
Hi,
I'm trying to decide if I can do the following with just Oracle Locator (with Oracle 9i), or if my organization needs to purchase Oracle Spatial. I have a web page where a user drags out a rectangular area of interest on a web map, and the values identifying this area are inserted into four variables - minlong, maxlong, minlat, and maxlat. The user can then query a database where the records contain coordinates defining rectangular areas. Using just Oracle Locator, is it possible to search this database and return only those records whose coordinates fall within the area of interest defined by the user? I am brand new to Oracle, but this seems pretty basic, and I'm almost sure that Locator can handle it, but I want to make sure before buying the Oracle license. Sorry I can't point you to the web page to see what I mean, but it's only on our development server.
Any help would be appreciated thanks.Hi,
If you are using Oracle9i you can do this with locator. Before Oracle9i this required spatial.
Hope this helps,
Dan -
I have been working with I guess spatial with the mapviewer demos and
never knew there was a product that comes with the database called Oracle
Locator... so how do I find out if it is installed properly, spatial is not installed
and what is it... and what are its capabilities.
thankshttp://www.oracle.com/technology/products/spatial/index.html
at the bottom there are some links that will help you -
PB2 issue Latitude says 'your current location is temporarily unavailable'.
PB2 issue Latitude says 'your current location is temporarily unavailable'.
please helpYou are probably in an area where the PlayBook cannot determine your location or it may be timing out before the device can provide this information. It doesn't seem to work too well indoors IMO.
BESX 5.0.4, SQL 2008, Exchange 2010 SP2 RU4a
Maybe you are looking for
-
How to find the user who did the personalization?
Hi All, Is there a way to find out which user has done personalizations in a given OA page? For e.g. if a user has done personalization for hiding a text bean in a page, I want to find out that user's name by passing the page name to a script? Even i
-
ERROR: Unable to open structapps file!
Hello, Having modified the structapps.fm in FM10, I am getting the following error within a dialog when attempting to use the same file in FM8: ERROR: Unable to open structapps file! FA_errno -43 Is FM not backward compatible ? OR do I need to reread
-
How to access a value from "List of Values" by giving a name?
I have a "List Of Values" defined in my BI Report. It comprises list of label-value pairs. I have defined a parameter :p_Value for the above "List Of Values" defnition. this parameter is used in datasource sql defnition to filter the query results. I
-
Help! My Acrobat keeps crashing when I view comments...
I'm running a MAC OS X (version 10.6.8), my acrobat pro XI keeps crashing when I am viewing comments from my clients. I need to view what they're saying so I can make appropriate edits to my design files...but I can't even view one without Acrobat cr
-
Am unable to use FaceTime. I was using it previously. I am getting the message that is turned off under settings. It is not turned off. Any suggestions