How to find a polygon that contains a period

I have a table which has (polygons) limits for all postal codes in my State and I want to find the zip code, which contains the LONG/LAT data

The following query is not valid aparently:

SELECT *.
OF ZIP_BOUNDARY b
WHERE sdo_relate (b.geom, SDO_POINT (-122.079155, 37.392892, NULL), "mask = touch'") = 'TRUE '.
;

WHERE sdo_relate (b.geom, SDO_POINT (-122.079155, 37.392892, NULL), "mask = touch'") = 'TRUE '.
*
ERROR on line 5:
ORA-29900: operator of link does not exist
ORA-06553: PLS-306: wrong number or types of arguments in the call to 'SDO_RELATE '.

What is the correct way to write such a request?

Try the following:

SELECT *.
OF ZIP_BOUNDARY b
WHERE sdo_relate (b.geom, sdo_geometry (2001, YOUR_SRID, SDO_POINT (-122.079155, 37.392892, NULL), NULL, NULL), "mask = ' CONTAINS") = "TRUE";

Tags: Database

Similar Questions

  • How to find the page that contains the downloads?

    I am connected to my account valid creative cloud. All I want to do is go to the page that allows me to make downloads of Acrobat, Photoshop, etc..  For the life of me I can't find the page!  Help, please.

    Log on to https://creative.adobe.com/apps

  • How to replace the image that contains clickable images?

    I use RoboHelp HTML 8. Some of my help topics have an image that contains several interactive images that allow the user to click to see, for example, the field or button definitions on objects on this image. In the past, I was able to grasp or to create a new image file and give it exactly the same name as the old image file (for example, ccm_assessment_shg.gif)-a new replacing the old. and when I saw the image in RoboHelp HTML, the new image contain still all image maps of the original image.

    However, now I see an image (.png) file in one of my subjects and I would like to replace it, but my old process 'replacement with the same name' does not seem to work. What is my problem? How can I do this in RoboHelp 8? Is the problem related to the file must be a gif instead of a png? (I must confess that it's been several months that I worked in RoboHelp, so I just forgot something. I can't find instructions on the use of image maps and self-help groups).

    Thanks a lot for all the good advice!

    Hello

    Exactly how you try to replace the image? I ask, because if you open the dialog box Image and work this way, you will probably lose the connection with the regions of image maps. My preferred method is to simply work completely behind RoboHelp back by replacing the image using Windows Explorer. RoboHelp should be none the wiser as long as the file name and location are the same.

    See you soon... Rick

    Useful and practical links

    Wish to RoboHelp form/Bug report form

    Begin to learn RoboHelp HTML 7, 8 or 9 in the day!

    Adobe Certified RoboHelp HTML Training

    SorcerStone blog

    RoboHelp EBooks

  • How to get a paragraph that contains the string selected in FDK?

    Hello

    I am writing a program that extracts content of the paragraph that contains a selection string. This program runs in the interaction point menu. When the user click on the menu item. The process as follows:
    1. find a chain on a document, for example: F_ApiFind ("ABC").
    2. the F_ApiFind ("ABC") API returns the F_TextRangeT structure.
    3. the string "ABC" has been highlighted on the document.

    Here's my question:
    How can I write code to locate an object ID paragraph (pgfId) that contains the string (or object) 'ABC '?.
    As the 'ABC' object belongs to the current paragraph, how can I get section ID (pgfId) and then get the content of the entire paragraph
    without a loop through FP_FirstFlowInDoc, FP_FirstTextFrameInFlow, FP_FirstPgf and FP_NextPgfInFlow.

    Thank you very much for you help,

    Thai Nguyen

    Hi thai,

    Paragraph ID is returned as part of the structure of F_TextRangeT, as the Member "objId". Let's say you have:

    F_TextRangeT tr;

    ... then:

    TR = F_ApiFind (...);

    On an action to search with success, "tr" will contain the pgfId of the paragraph. I'm assuming you're looking for a string that is entirely contained in a paragraph, in which case two ways contains the ID of the paragraph:

    tr.beg.objId

    TR.end objId

    If you want to retrieve all the text in the paragraph after the search, you could do something like: (attention, incomplete code!)

    F_TextItemsT ti;

    F_TextRangeT tr;

    F_ObjHandleT docId.

    ...

    TR = F_ApiFind (...);

    TR. Beg.offset = 0;

    TR.end.Offset = FV_OBJ_END_OFFSET;

    TI = F_ApiGetTextForRange (docId, & b, FTI_String);

    .. After that the text of the paragraph will be included in the ti TextItems structure. Navigate through this structure can be difficult and I will renounce any discussion about it for now unless you need more help. There is good information in the developer reference as to its use.

    Russ

  • How to find the sites that I have visited recently?

    I'm trying to find a site that I visited a few days ago because it bore the name of a song on what I'm looking for. I know I found places I visited today, yesterday, in the past week, month, year, etc. in the past... but I can't remember how to get there. Can someone please send the steps with screenshots so I know where to look?
    Thank you
    Karen

    Open the history Manager < control > < Shift > H.
    In the search bar, enter the name of the site.

  • Windows Live Mail 2011 - how to create a Signature that contains a hyperlink to the address of my website?

    In Windows Live Mail 2011, I am trying to create a Signature that contains a hyperlink to my website address.

    I click on Options - Mail - Signatures - new.

    If I choose 'text' - there is no way to add a hyperlink.

    If I choose "files, browse" do I look for? I'm supposed to be creating an HTML document to the address of the site? and if yes, how do I do that?

    You'll get better help at Windows Live Mail Solution Center - Forum

    [See also

    Windows Live Help Center, Windows Live Mail, Windows Live Hotmail]

  • I need to find all documents that contain more than one keyword

    I need to find documents that include more than one specific word (Word or WP) (2 or more) and which do not form a sentence.  For example, words can be included in the various paragraphs of a document.

    I tried to use the windows search option, but it only lets you search for a word or phrase in the content of the documents in a folder.  If you try to refine your search with a second term, the search is not limited to documents that contain the first word... already so you get just a bunch of documents, some of which contain the two words...

    I can't believe that this search option is not available in WORD.  In WP, I used to be easily able to search for one or more terms or expressions and was even able to specify when the words must appear in the same paragraph, line, etc., in all my documents WP...  This was very helpful.

    Is there a method I have used to locate the documents that I need in WORD? Thank you!

    Maybe I misunderstood, but for my W7 it seems to look up words in the same document, separated if I open "search programs and files" in the menu and enter something like:

    word1 word2 kind: = document

    More information on research using W7 here - http://www.howtogeek.com/73065/learn-the-advanced-search-operators-in-windows-7/ and also http://windows.microsoft.com/en-us/windows7/advanced-tips-for-searching-in-windows

    There is also the 'GOLD' and 'AND' options that can help, then perhaps try:

    "word1 AND word2 kind: document = ' (without the quotation marks).

    It not work for you? Or have I misunderstood the question?

  • How to find the name that differ just a little

    Hi all

    I wonder if is a short distance to find the name that differ for 2/3 characters;

    Example, I have a table that contains 1 varchar2 column.

    Martello

    point

    Pistola

    cemmello

    Cammelli

    I need to write a query like:

    Select * from table where colum = point

    in the result set, I want to

    point

    cemmello

    Cammelli

    Thank you

    F.

    Hello francy77

    In fact, it is not possible. There is a SQL "soundex" function, which "returns a string containing the phonetic representation of the char . This function allows you to compare the words that are spelled differently, but sound as well in English. »

    Example: Smith could be written as "SMYTHE".

    Try this:

    SELECT first_name

    FROM (SELECT 'Smith' AS the name OF DOUBLE UNION ALL

    SELECT 'Sophie' AS the name OF THE DOUBLE)

    WHERE SOUNDEX (first_name) = SOUNDEX ('Smythe')

    ;

    You get two records...

    But if you have a specific logic, then you must create a function and he set what text - what you want text input.

    Is it useful or the solution for you?

  • How to create a polygon that covers a set of geometries?

    Hi people,

    I have a spatial table with the parcel data. Some are polygons and lines.
    What I have to do is to create a single polygon that covers all these plots.
    I tried some spatial functions, but the result is not perfect.
    Could you guys give some advice on how to do it using the Oracle Spatial functions?

    Thank you
    Luis

    Luis etc.,

    Delicate using the ST_PolygonBuilder (JTS) that implements my code SC4O Java-in-the-database and some coding, I managed to product a polygon that covers the data correctly.

    Note that I use only external linestrings which provides some Luis.

    -- First create a table holding only the outer lines.
    --
    create table outerLines as
      SELECT SDO_GEOMETRY(2002, 8292, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(-49.6878936628642, -18.4995538840232, -49.6875224063873, -18.4994400734344, -49.6882811644211, -18.4960292763006, -49.6886251490431, -18.4958803030445, -49.6906307026931, -18.4950115281619)) as geom from dual union all
      SELECT SDO_GEOMETRY(2002, 8292, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(-49.6884083531774, -18.4917625230274, -49.6886528151554, -18.4922451253898, -49.6898503241639, -18.4946091658756, -49.690098431643, -18.4950991112698, -49.6902068702432, -18.4950498009285, -49.6905958643821, -18.4948724904445)) as geom from dual union all
      SELECT SDO_GEOMETRY(2002, 8292, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(-49.6883413960309, -18.4918992292229, -49.6885491287687, -18.4923048595269, -49.6849860033691, -18.4934740072225, -49.6855427926656, -18.4945793006294, -49.6857982402423, -18.4950861997106, -49.6860079716291, -18.4955025995491, -49.6836133980005, -18.4962994912622, -49.6834396716227, -18.4957578264012)) as geom from dual union all
      SELECT SDO_GEOMETRY(2002, 8292, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(-49.6792385551751, -18.5000418095053, -49.6797119992317, -18.4998345697814, -49.6783397446724, -18.4980535328215, -49.6810365599698, -18.4971609552001, -49.6810385833744, -18.4971564511947, -49.6835051531636, -18.4963355157698, -49.6833312619652, -18.4958030666281)) as geom from dual union all
      SELECT SDO_GEOMETRY(2002, 8292, NULL, SDO_ELEM_INFO_ARRAY(1,2,1), SDO_ORDINATE_ARRAY(-49.6878678853177, -18.4996181336176, -49.6861731626715, -18.4991017919552, -49.6834080082784, -18.4982775371379, -49.6833583465082, -18.4983066497055, -49.6832975737928, -18.4983520405102, -49.6831594052426, -18.4984987309426, -49.6830586383606, -18.4986094463067, -49.6829994956301, -18.4986769870823, -49.6829194669485, -18.4987385992949, -49.6828337343539, -18.4987905933782, -49.6827167582476, -18.4988411048671, -49.6825978712605, -18.4988566328165, -49.6824876108137, -18.4988587567866, -49.6824343436196, -18.4988638980162, -49.6823495710101, -18.498901802054, -49.6820036074112, -18.4990727977958, -49.6815739264209, -18.4993045655044, -49.6815394467332, -18.4993194542279, -49.6815037571481, -18.4993313944568, -49.681467095582, -18.4993402576461, -49.6814297528519, -18.4993459734892, -49.6813920251781, -18.4993484966453, -49.6813542118344, -18.4993478070996, -49.6813166127745, -18.4993439103221, -49.6812795262518, -18.4993368372241, -49.6812432464542, -18.4993266439127, -49.6812080820875, -18.4993134018902, -49.6793284309429, -18.5001537628556)) as geom from dual;
    
    -- Firstly, fill in the gaps between all the outer lines by generating small 2 point linestrings....
    -- This is what the CTE, connected_lines, produces
    --
    with connected_lines as (
    select row_number() over (order by 1) as rid,
           f.geom
      from (select sdo_geometry(2002,8292,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(sx,sy,ex,ey)) as geom
              from (select distinct sx,sy,ex,ey,dist,
                           min(dist) over (partition by sx,sy) as mdist
                      from (select a.x as sx,a.y as sy,b.x as ex,b.y as ey,
                                   sdo_geom.sdo_distance(sdo_geometry(2001,8292,sdo_point_type(a.x,a.y,null),null,null),
                                                         sdo_geometry(2001,8292,sdo_point_type(b.x,b.y,null),null,null),
                                                         0.005) as dist
                              from (select p.x as x, p.y as y
                                      from outerLines g,
                                           table(geom.getVector(g.geom)) v,
                                           table(geom.getPointSet(v.AsSdoGeometry(8292))) p
                                    group by p.x, p.y
                                    having count(*) = 1
                                   ) a,
                                   (select p.x as x, p.y as y
                                      from outerLines g,
                                           table(geom.getVector(g.geom)) v,
                                           table(geom.getPointSet(v.AsSdoGeometry(8292))) p
                                    group by p.x, p.y
                                    having count(*) = 1
                                   ) b
                              where a.x != b.x and a.y != b.y
                            )
                    )
                    where dist = mdist
            UNION ALL
            select g.geom
              from outerLines g
          ) f
    )
    /* Now ask SC4O's ST_PolygonBuilder to try and create a polygon from the set of lines */
    select sc4o.ST_PolygonBuilder(CAST(COLLECT(f.geom) as mdsys.sdo_geometry_array),8) as polygon
      from ( /* Now, the WITH connected_lines produces 2 copies of each linestring with the coordinates reversed.
                    These have to be removed/de-duped before being passed into the ST_PolygonBuilder */
            select sdo_geometry(2002,8292,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(sum(x1),sum(y1),sum(x2),sum(y2))) as geom
              from (SELECT rid,
                           case when rid=NVL((lag(rid,1) over (partition by rid order by x)),rid)
                                then case when vertexId = 1 then x else null end
                            end as x1,
                           case when rid=NVL((lag(rid,1) over (partition by rid order by x)),rid)
                                then case when vertexId = 1 then y else null end
                            end as y1,
                           case when rid=NVL((lag(rid,1) over (partition by rid order by x)),rid)
                                then case when vertexId = 2 then x else null end
                            end as x2,
                           case when rid=NVL((lag(rid,1) over (partition by rid order by x)),rid)
                                then case when vertexId = 2 then y else null end
                            end as y2
                    FROM   (select rid,
                                   row_number() over (partition by rid order by x) as vertexId,
                                   x, y
                              from (select min(m.rid) rid,
                                           t.x, t.y
                                      from connected_lines m,
                                           table(sdo_util.getVertices(m.geom)) t
                                     where sdo_util.GetNumVertices(m.geom) = 2
                                     group by t.x,t.y
                                     order by t.x )
                           )
                      )
                    group by rid
        union all
        /* Select and pass into ST_PolygonBuilder the original outer lines */
        select m.geom as geom
          from connected_lines m
         where sdo_util.GetNumVertices(m.geom) > 2
        ) f;
    -- Result
    --
    POLYGON
    -----------------------
    MDSYS.SDO_GEOMETRY(2003,8292,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),MDSYS.SDO_ORDINATE_ARRAY(-49.6906307026931,-18.4950115281619,-49.6886251490431,-18.4958803030445,-49.6882811644211,-18.4960292763006,-49.6875224063873,-18.4994400734344,-49.6878936628642,-18.4995538840232,-49.6878678853177,-18.4996181336176,-49.6861731626715,-18.4991017919552,-49.6834080082784,-18.4982775371379,-49.6833583465082,-18.4983066497055,-49.6832975737928,-18.4983520405102,-49.6831594052426,-18.4984987309426,-49.6830586383606,-18.4986094463067,-49.6829994956301,-18.4986769870823,-49.6829194669485,-18.4987385992949,-49.6828337343539,-18.4987905933782,-49.6827167582476,-18.4988411048671,-49.6825978712605,-18.4988566328165,-49.6824876108137,-18.4988587567866,-49.6824343436196,-18.4988638980162,-49.6823495710101,-18.498901802054,-49.6820036074112,-18.4990727977958,-49.6815739264209,-18.4993045655044,-49.6815394467332,-18.4993194542279,-49.6815037571481,-18.4993313944568,-49.681467095582,-18.4993402576461,-49.6814297528519,-18.4993459734892,-49.6813920251781,-18.4993484966453,-49.6813542118344,-18.4993478070996,-49.6813166127745,-18.4993439103221,-49.6812795262518,-18.4993368372241,-49.6812432464542,-18.4993266439127,-49.6812080820875,-18.4993134018902,-49.6793284309429,-18.5001537628556,-49.6792385551751,-18.5000418095053,-49.6797119992317,-18.4998345697814,-49.6783397446724,-18.4980535328215,-49.6810365599698,-18.4971609552001,-49.6810385833744,-18.4971564511947,-49.6835051531636,-18.4963355157698,-49.6833312619652,-18.4958030666281,-49.6834396716227,-18.4957578264012,-49.6836133980005,-18.4962994912622,-49.6860079716291,-18.4955025995491,-49.6857982402423,-18.4950861997106,-49.6855427926656,-18.4945793006294,-49.6849860033691,-18.4934740072225,-49.6885491287687,-18.4923048595269,-49.6883413960309,-18.4918992292229,-49.6884083531774,-18.4917625230274,-49.6886528151554,-18.4922451253898,-49.6898503241639,-18.4946091658756,-49.690098431643,-18.4950991112698,-49.6902068702432,-18.4950498009285,-49.6905958643821,-18.4948724904445,-49.6906307026931,-18.4950115281619))
    

    The result is a nice clean polygon.

    http://www.spatialdbadvisor.com/files/PolygonCoveringGeometrySet.PNG

    This, more than my last post is the best I can do. It took me many, many hours to implement. Please allow points since it is a correct result. Also, consider making a PayPal donation on my Web site for the hours I spent.

    NOTE: The package space companion 4 Oracle (SC4O) is available for download FREE on my site. Again, donations accepted if the code made what you want.

    concerning
    Simon

    Published by: Simon Greener on April 11, 2013 09:53 Changed where a.x, b.x and b.y-a.y etc. to where a.x! = b.x and a.y! b.y =

  • E4X: How to get the items that contain a string pattern in the name of the node?

    Is there a way to retrieve the children of an XMLList where the name of the node of a child contains a template string?

    For example:

    account <>

    < XblahX / >

    < cow / >

    < YblahY / >

    < / recording >

    How to get items in folder which has a node name that contains the string "blah"?

    var rec: XML =

    ;

    var r: RegExp = / blah /;
    var elems:XMLList = rec.children (). (localName () *.search (r) >-1);
    trace (elems. ToXmlString())

  • How to find the queries that I've already posted

    How to find previously posted queries?

    osxYosemite10

    Click / tap your user name, and then on the tab "Content" as below.

    RADSTOCK

  • Windows 7 is not find all files that contain the phrase that I have sought in their name

    I am looking for files with a certain expression in name. When I type top-right search gives me some files with this phrase in their name and then I cut them in the file. But when I go in the file I searched, I still see a lot of files that contain this phrase in their names that do not appear in the search.

    Hello

    1 did you change on your computer?

    2 did you receive an error message?

    Method 1:

    I suggest you run the fixit tool and check.

    Difficulty of Windows Desktop Search when it hangs or no display of results

    http://support.Microsoft.com/mats/windows_search/en-us

    Method 2:

    I also suggest you to see link and check.

    Open the troubleshooter for search and indexing

    http://Windows.Microsoft.com/en-us/Windows7/open-the-search-and-indexing-Troubleshooter

    See also:

    Improve Windows searches using the index: frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows7/improve-Windows-searches-using-the-index-frequently-asked-questions

  • How to open an attachment that contains a .ows file?

    I need to open an attachment that contains a .ows file. I don't see this file extension when I look in my entire Associations. My computer is Windows 7. What should I do to open the file or add the .ows extension to my associations together?

    Original title: .ows file

    Hello

    Thanks for posting in the forum the Microsoft community.

    Unfortunately, the .ows files are not supported by Windows 7, but you can use your favorite search engine to download and install a program according to the file type, you must use.

    NOTE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

  • How to display the data, that contains non-numeric characters.

    Hello

    I have table t1 with column of type varchar2 below

    ID

    ------

    11151

    11412

    1113

    1 to 114

    11b 15

    111 6

    Now, I need to display the data, that contains non-numeric characters.

    Did you get the result like:

    STR

    ----------

    1 to 114

    11b 15

    111 6

    WITH t
         AS (SELECT '11151' str FROM DUAL
             UNION ALL
             SELECT '11412' FROM DUAL
             UNION ALL
             SELECT '1113' FROM DUAL
             UNION ALL
             SELECT '1a114' FROM DUAL
             UNION ALL
             SELECT '11b15' FROM DUAL
             UNION ALL
             SELECT '111c6' FROM DUAL)
    SELECT *
      FROM t
      where regexp_like(str,'[^[:digit:]]');
    

    See you soon,.

    Manik.

  • How to develop a slide that contains certain conditions before authorizing a person to move

    I developed a MAIN slide that allows a user to access multiple slides by using the option to click box and then return to the MAIN slide it the end of the duration of the slide said.

    My question, how to develop a slide that's smart enough to know he must away slide of HAND 2 HAND only once the end-user closed x number of shares? Also use functions within the click box to develop this ability?

    Take a look at this tutorial:

    http://www.Infosemantics.com.au/Adobe-Captivate/template/03-dynamic-menu-page

Maybe you are looking for

  • ITunes to Apple Lossless Format Question for 12.5.1.21

    I recently repaired my Windows 10 64-bit OS and reinstalled iTunes (current version 12.5.1.21).  I noticed that you are no longer able to select a song file and store it as Apple Lossless file when right click on iTunes.  I found a choice in the 'Set

  • Satellite M60-162: vertical and transparent stripe on the screen

    Hello Satellite M60-162 appeared a transparent white vertical stripe on the screen of my laptop. The band is present at startup in the BIOS and in normal operation of the computer. How can I fix?

  • Why Apple music removes the already downloaded songs

    When I try to read an album I downloaded already it will pop the whole album to go to next songs on the playlist. Why does do that if I pay for the subscription?

  • HP 15 laptop: the bluetooth driver problem

    I have a HP 15 Notebook PC with operating system windows enterprise 8.1 N. my bluetooth driver does not work, it is very difficult to install the driver and activate bluetooth. my product number is J8B79PA #ACJ. can you please send me the link to ins

  • Transparent caption on slider

    Hello I wish I could use my slider, even when a text is above it. Right now, I can not access the cursor in the text box. How can I move the cursor, even when I catch on the text box? Thank you Alex