Sdo.intersection ... problems

Hi all,
I use this simple query:
CREATE TABLE INTER2 AS
SELECT SDO_GEOM.SDO_INTERSECTION(G1.SHAPE, G2.SHAPE, 0.005) SHAPE
FROM RAIL G1, ROADS G2;
to find the intersections between these two layers. The first layer (rail) contains 47 lines and the second one (roads) 78 lines.
The new table that is constructed by running this query has 3666 rows (I think that this is because 78x47=3666) but when I visualize the layer in the spatial in the spatial index advisor I can see that only 40 points (intersections) exists.
So, I suppose that this query checks every possible pair from the two layers and creates a row which either has a point (intersection) in the shape column or has null value in this column.
My problem is that this layer cannot be inserted into ARCINFO (throught ARCSDE) because of its structure (every row must have a shape - geometry).
Can anyone tell me how can I perform this query and have as a result ONLY the rows with the points (intersections of the two layers)so I can visualize it in ARCINFO?
Thanks in advance

Hello John:
Seems like you are missing something from your query. I think it would help eliminate those records that do not return a SHAPE by using SDO_RELATE in your where clause. The query would look something like this:
CREATE TABLE INTER2 AS
SELECT SDO_GEOM.SDO_INTERSECTION(G1.SHAPE, G2.SHAPE, 0.005) SHAPE
FROM RAIL G1, ROADS G2
WHERE
MDSYS.SDO_RELATE(G1.SHAPE, G2.SHAPE, 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
BUT - you may have to "trick" ArcSDE into recognizing the table (or should I say "feature class"). You may have to use an ArcSDE command to create the feature class, then go into SQL and drop the table. This has the effect of putting the correct metadata into the SDE schema tables, such as LAYERS and SPATIAL_REFERENCES. When you drop the table using SQL, the metadata will remain.
Then, use the CREATE TABLE... to create and populate the "feature class". Be sure to create a spatial index - we have found that you do not have to use the same name for the index as the one created by ArcSDE when you did the ArcSDE command to create the "feature class".
This trickery is necesarry because ArcSDE really prefers that EVERYTHING is created and populated via ArcSDE commands or ArcCatalog, but there are ways to "fool" the ESRI software.
Let me know if this helps.
R Clement
Alaska DNR

Similar Messages

  • Intersecting problem with two triggers

    Hello to all professionalists.
    Today I have got a very big problem with triggers.
    I have written an historical function for the application we use. This historical function works while it created triggers on every table that should be audited. There are some specialities like auditing on individual columns but the main reason is the following:
    for each table the auditing is turned on every value that is changed should be written with old and new value to a history Table.
    This works fine except that when there is another trigger on that table (BEFORE ....ROW) that does an UPDATE on another table. Then the auditing is not working as expected. Well, it isn't working at all for that table.
    So my question is if you have had the same experience or if you could tell me some workaround.
    Thank you very, very much
    Henrik Rünger

    I found the fix, go to System Preferences and open Mission Control and uncheck the box to keep monitors as they were (When switching to an application...........)

  • Converting shapefile to sdo SRID problem

    when i converted shape file had [ PROJCS = "WGS_1984_UTM_Zone_36N" ] to sdo and choose SRID=8307 when i created theme has the result by MapBuilder the result was different from the shapeFile.
    can anyone tell me why ? and how to fix this ?
    ....Thanks for any assistance.

    Hi,
    The proper SRID for "WGS_1984_UTM_Zone_36N" is 32636 and not 8307.
    Regards.

  • Adobe Illustrator - Objects & text intersecting problem

    I have no idea what I did , but for some when I drag an object next to another object something usually comes out saying intersect, same this with text. Please take a look at the video below.

    Have Smart Guides on? Cmd(Ctrl)-U is the toggle.

  • Intersection problem

    I have a shpfile with city streets. I want to find the intersection of two streets in that file is this possible in spatial.
    Matt

    Oracle Spatial will only work using data loaded into Oracle using the SDO_GEOMETRY data type.
    There is a shapefile converter available for download here on OTN - it will load shapes and attributes into an Oracle table with an sdo_geometry column.
    After data is loaded into Oracle, then you can use spatial to find the intersection of two line strings (streets).
    Hope this helps

  • Problem in Converting Shapefile to SDO Layer

    Hi all,
    I am new to the Oracle Spatial database 10g (10.2.0.1.0). I got problem in Converting shapefile to sdo.
    My ESRI Shapefile (Tempshp.shp,Tempshp.shx,Tempshp.dbf) contain field name as "LEVEL".
    I can able to run the shp2sdo and "Tempshp.sql" and "Tempshp.ctl" files are all created without any problem.
    when i try to run the following command in SQLPlus
    @Tempshp.sql
    The following error message were generated
    LEVEL NUMBER,
    ERROR at line 4:
    ORA-00904: : invalid identifier
    May i know whats the actual problem, Is there any Reserved word/ keyword like LEVEL is present in oracle/ Spatial.
    Regards,
    Prema Selvam.
    Message was edited by:
    Prema Selvam
    Message was edited by:
    Prema Selvam

    Hello Ro,
    Thanks,
    If we are changing the field name LEVEL to Something like LEVELX, then whether we need to change the the LEVEL as LEVELX in .ctl also.
    If i am changing the Field name whether it will affect the spatial function such as join, etc..,
    Thanks & Regards,
    Prema Selvam.

  • Little problem with Shape.intersects

    I have the following code:
    boolean isCollision = island.contains(line.getP1()) ||
    island.contains(line.getP2()) ||
    island.intersects(line.getP1(), line.getP2(), 1, 1);This doesn't work:
    The method intersects(double, double, double, double) in the type Shape is not  applicable for the arguments (Point2D, Point2D, int, int)
    Interface java.awt.Shape:
    intersects(double x, double y, double w, double h)
    Tests if the interior of the Shape intersects the interior of a specified rectangular area.
    Now I changed my code to the following:
    boolean isCollision = island.contains(line.getP1()) ||
    island.contains(line.getP2()) ||
    island.intersects(line.getP1().getX(), line.getP1().getY(), 1, 1) &&
    island.intersects(line.getP2().getX(), line.getP2().getY(), 1, 1);However, it doesn't seem to work since I don't get a "true" if there is an intersection; the "contains" method works excellent.
    How can I intersect a line with a shape to see whether there is an intersection?
    Thanks!

    I am sorry, I am unsure in which forum my question fits best. Can an admin delete my posting from the wrong forum?
    I would really appreciate help on this topic since I can't solve this problem alone :(

  • Intersecting Layers with alpha problem

    Hi,
    I have a problem with Motion when two layers intersect. On layer is totally opaque, and the second layer has transparent areas. The problem occurs in areas when the transparent areas intersect with opaque areas. In those regions I get a dark gray line appearing.
    Check out this image and you will see what I mean.
    http://jack.fxhome.com/MotionLine.jpg
    Note: I get this unwanted line in the exported frame as well.
    Why does motion do this?
    Is there anyway around this?
    Thanks

    1) Try setting your Render Quality to Best (under the View pop-up menu)
    2) Try changing the alpha interpretation of the layer with transparency - select it, press Shift-F, and try the different options in the Inspector's Media tab.

  • Smartforms problem ? intersection of template boundaries

    hi,
    in my smartform project; i am using several templates.and many of them have intersection with each other.the question is;some boundaries which are intersected with each other are visible but some of them are not.do u have any ideas?

    HI,
    If the windows are intersecting with each other also not a problem, that windows should be print. check out correctly.there might some other problem
    Regards
    Sudheer

  • Problem in testing customer SDO service from Enterprise manager

    I am trying to test customer SDO service( This is a built in service with SOA Demo) . While testing i face exception given below . There seems to be some proble in resolving data source soaDataSource. I have checked all configuration is correct. In JNDI tree also the SoaDataSOurce entry can be clearly seen. i have face similar problem with JCA Db adapter.
    Any suggestion for this problem will be greatly appreciated .
    Syed Naqvi
    <Jul 19, 2011 10:33:09 AM IST> <Warning> <oracle.j2ee.ws.common.jaxws.JAXWSMessa
    ges> <BEA-000000> <Exception while executing the business logic: JBO-27200: JNDI
    failure. Unable to lookup Data Source at context jdbc/soaDataSource: Unable to
    resolve 'jdbc.soaDataSource'. Resolved 'jdbc'>
    java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException:
    JBO-27200: JNDI failure. Unable to lookup Data Source at context jdbc/soaDataSou
    rce: Unable to resolve 'jdbc.soaDataSource'. Resolved 'jdbc'
    at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestMode
    l.java:575)
    at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:381)
    at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:298)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(Unknown Source)
    at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
    at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMetho
    dBinding.invoke(MethodExpressionMethodBinding.java:53)
    at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMet
    hodBinding(UIXComponentBase.java:1256)
    at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand
    .java:183)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.r
    un(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._pr
    ocessPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.bro
    adcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclu
    de.java:102)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.r
    un(ContextSwitchingComponent.java:92)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._pr
    ocessPhase(ContextSwitchingComponent.java:361)
    at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.bro
    adcast(ContextSwitchingComponent.java:96)
    at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclu
    de.java:96)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:7
    56)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplicat
    ion(LifecycleImpl.java:765)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(L
    ifecycleImpl.java:305)
    at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(Lifecyc
    leImpl.java:185)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java
    :101)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.j
    ava:205)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter
    (RegistrationFilter.java:106)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:446)
    at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter
    .java:60)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
    istChain.doFilter(TrinidadFilterImpl.java:446)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilt
    erImpl(TrinidadFilterImpl.java:271)
    at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilte
    r(TrinidadFilterImpl.java:177)
    at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFi
    lter.java:92)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilt
    er.java:41)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:1
    75)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.
    java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java
    :203)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangP
    refFilter.java:158)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.ja
    va:542)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:31
    3)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUt
    il.java:413)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.jav
    a:94)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:1
    61)
    at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:13
    6)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
    ilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.wrapRun(WebAppServletContext.java:3715)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3681)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    120)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2277)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:2183)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1454)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: JBO-27200:
    JNDI failure. Unable to lookup Data Source at context jdbc/soaDataSource: Unabl
    e to resolve 'jdbc.soaDataSource'. Resolved 'jdbc'
    at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(
    DispatchUtil.java:260)
    at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWi
    thDispatch(OperationInfoImpl.java:992)
    at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java
    :729)
    at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestMode
    l.java:569)
    ... 79 more
    Caused by: javax.xml.ws.soap.SOAPFaultException: JBO-27200: JNDI failure. Unable
    to lookup Data Source at context jdbc/soaDataSource: Unable to resolve 'jdbc.so
    aDataSource'. Resolved 'jdbc'
    at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException
    (DispatchImpl.java:1012)
    at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:803
    at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationW
    ithRetry(OracleDispatchImpl.java:235)
    at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchI
    mpl.java:106)
    at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(
    DispatchUtil.java:256)
    ... 82 more
    <Jul 19, 2011 10:33:16 AM IST> <Warning> <oracle.adf.view.rich.change.MDSDocumen
    tChangeManager> <BEA-000000> <ADFv: Unable to find matching JSP Document Node fo
    r: RichShowDetail[UIXFacesBeanImpl, id=drqsd1].>
    <Jul 19, 2011 11:17:54 AM IST> <Warning> <oracle.adf.share.ADFContext> <BEA-0000
    00> <Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initializati
    on is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent
    To see the stack trace for thread that is initializing this, set the logging lev
    el of oracle.adf.share.ADFContext to FINEST>
    m_connection-jpss nul

    Thanks for the blog Salil.
    What ever it is mentioned is already done in SOAMANAGER. Endpoints are available for the service.
    Below is the Overview of the service:
    Object Status:               Services: 1 / Endpoints: 1 
    Porttype Namespace:   urn:sap-com:document:sap:soap:functions:mc-style
    Porttype Name:             YMTEST_WS
    Internal Name:               YMTEST_WS
    SOAP Applikation:         URN:SAP-COM:SOAP:RUNTIME:APPLICATION:RFC:710
    Package Name:             $TMP
    Ok, i have developed 2 web services. One web service in ECC 6.0, where Java stack not available so i provided CRM system Java stack address in the global setting and executed my ECC 6.0 web service which says "No endpoints are found for the Web service"
    Following is the URL:  http://tuasd06db.tuasw2k.tuaspower.com.sg:8000/sap/bc/srt/wsdl/sdef_YMTEST_WS/wsdl11/ws_policy/document?sap-client=220
    The one web service which created in CRM 2007, i can test in the navigator, no problem with that. 
    Following is the URL: 
    http://tuasd06db.tuasw2k.tuaspower.com.sg:8002/sap/bc/srt/wsdl/bndg_DE7DA5BA0B3A93F1AF60001A64258BFC/wsdl11/allinone/standard/document?sap-client=220
    You can find the URL difference btw the URL's. Do i need to publish the service in the service registry? I thought for testing it is not required.
    Now all i have problem with the ECC 6.0 web service.
    Cheers,
    Madhu

  • Problem with opening PDF files from JSF page using SDO

    Hi all,
    I'm new with JSF and was attempting to read a PDF file from a Database using SDO and JSF. The code below throws an exception when casting from DataObject to Blob. The getLcDoc() method was created by WSAD when I dragged an SDO relational record onto the JSF page. This method returns an DataObject type which I tried casting to a Blob type before using it further. However, an exception is thrown.
    Any feedback is appreciated.
    Arv
    try {
                   FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   Blob file= (Blob)getLcDoc().get("ATTACH");
                   int iLength = (int)(file.length());
                   response.setHeader("Content-type", "application/pdf");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   response.setContentLength(iLength);
                   ServletOutputStream os = response.getOutputStream();
                   InputStream in = null;
                   in = file.getBinaryStream();
                   byte buff[] = new byte[1024];
                   while (true) {
                   int i = in.read(buff);
                   if (i<0) break;
                   os.write(buff,0,i);
                   os.flush();
                   os.close();
         } catch(Exception ex){
              System.out.println("Error while reading file : " + ex.getMessage());
         }

    Hi...I found out that there is actually no need to use a Blob object at all. You can simply call the OutputStreams write() method and pass the DataObject.getBytes() method that returns a byte[] array. The revised code is shown at the end of this posting.
    However, a few other teething problems exist:
    1. This works well only if I specify the content type in response.setHeader() method. What if my users upload different types of files, is there a way that the browser opens according to the file type without setting the content type?
    2. I still have a problem opening PDF files, even if I specify - response.setHeader("Content-type", "application/pdf");
    I get the message - The file is damaged and could not be repaired
    3. I would also like this to open the attachment in a new window and using target="_blank" doesn't seem to work as seen below:
    <h:commandLink
                                                 styleClass="commandLink" id="link1" action="#{pc_DocumentDetailsRead.doLink1Action}" target="_blank">
                                                 <h:outputText id="text5" styleClass="outputText"
                                                      value="Click Here"></h:outputText>
                                            </h:commandLink>
    ------------------------Revised code-----------------------------------------
    FacesContext faces = FacesContext.getCurrentInstance();
                   HttpServletResponse response =(HttpServletResponse) faces.getExternalContext().getResponse();
                   response.setHeader("Content-type", "application/msword");
                   response.setHeader("Content-Disposition", "inline; filename=Attachment");
                   response.setHeader("Expires","0");
                   response.setHeader("Cache-Control","must-revalidate, post-check=0, pre-check=0");
                   response.setHeader("Pragma","public");
                   ServletOutputStream os = response.getOutputStream();
                   os.write(getLcDoc().getBytes("ATTACH"));
                   os.flush();
                   os.close();

  • Churn/Intersect MDX problem

    Hi All,
    I would like to see your approach of calculating churn based on the intersect of dimension members with MDX. Do you believe it is advisable to do it directly in the cube based on the dimension with more then 10 million records?
    Here's the problem.
    I'd like to calculate the following:
    Clients this month - clients the same month previous year.
    Simple right? Well, it gets trickier. The comparison needs go down to the grain which is the client, meaning, i cannot compare raw numbers (which are distinct count measures in the cube btw) but the actual client ID's. I tried playing around with intersect
    but i really need a simple example first before I start adding complex logic to the calculation (like fixed parameters for one batch and not the other, conditional logic over another dimension's attribute etc..).
    Any good ideas and approaches to solving this problem?
    Thanks! 

    Hi L,
    It's a pity my demo site isn't still online. Here's a blog about churn. http://richardlees.blogspot.com.au/2008/12/blog-post.html
    The mdx might look something like
    with  
    member Measures.LastMonth as count(filter(Customers.Customer.Customer,(Measures.NetSales,[Time].FiscalCalendar.prevmember)<>0))
    member Measures.RetainedThisMonth as count(filter(nonempty(Customers.Customer.Customer,Measures.NetSales),(Measures.NetSales,[Time].FiscalCalendar.prevmember)<>0))
    member measures.R as 
    iif(Measures.LastMonth=0,null,
    Measures.RetainedThisMonth/Measures.LastMonth)
    , format_string="#,#.00%" 
    select {LastMonth,RetainedThisMonth, measures.R } on 0
    ,nonempty([Time].FiscalCalendar.[Month],Measures.NetSales)  on 1
    from sales
    Hope that helps,
    Richard

  • Problem with intersection point

    Hi!
    I cant use the IMAQ Line intersection with lines created from IMAQ find edge. I get the error message:
    "These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
    The type of the source is 1-D array of
    cluster of 10 elements.
    The type of the sink is cluster of 2 elements."
    What am I doing wrong, or how can I get the intersection point of these two lines?
    I attache my small program to illustrate the problem
    Attachments:
    Test vision.vi ‏142 KB

    You need to manipulate your data a little.
    The output from the IMAQ find edge function returns an array of edges (each edge defined by ten clustered elements).
    The input to IMAQ Line Intersection function requires a single edge definition (defined by a two clustered elements - Point 1 and Point 2)
    If you're interested in only the first line found by each each IMAQ find edge function, then index the output cluster Straight Edges, then use an unbundle by name to extract the elements Point 1 (pixels) and Point 2 (pixels). Then bundle these together and provide the resultant cluster to the input Line 1 of IMAQ Line Intersection. Do the same for the second IMAQ find edge function and wire this to Line 2 of IMAQ Line Intersection.
    If you're interested in ALL the line results from IMAQ Find Edge, then you'll have to run this lot inside a loop and index each result sequentially.
    Thoric (CLA, CLED, CTD and LabVIEW Champion)

  • Lights in 3d intersection, shadow problem

    Hi,
    When setting 2 shapes (plane) in 3D so that they have and intersetion (say 30degrees offsett), and one smaller then the other, when putting a light into the scene, to make the small one cast a shadow on the big on, the shadow looks good, but not at the intersection part. Why do I see shadow in the intersection, this should be just a clean intersection...
    Helge

    I had some shadow behavior problems a few projects ago. While they were not the same as yours, I discovered that the "Shadow Softness" parameter on the light was making things behave improperly.
    Try setting the "Shadow Softness" parameter to "0". That made things behave properly for me.
    Apple has contacted me about this problem and I have provided them with my project files in order to help their engineers debug the shadow issues. Hopefully there will be a patch soon.
    Good-luck

  • Problem when using SDO operations

    Hello everyone,
    I'm trying to execute some spatial SQL queries and I've come up with a problem: If I enter the following query, the spatial operation (in this case SDO_INSIDE) is executed perfectly and data is returned:
    SELECT SUM(fact.quant) as SUM_quant, instalacao.name as Name
    FROM fact, instalacao, layer_region, emissao
    WHERE fact.instalacao_id = instalacao.instalacao_id AND fact.emissao_id = emissao.emissao_id AND SDO_INSIDE (instalacao.glocal, layer_region.geom)='TRUE'
    GROUP BY instalacao.instalacao_id, instalacao.name
    ORDER BY instalacao.instalacao_idHowever, if I introduce another GROUP BY element, like this (Where 'emissao' does not have any spatial information, and is not used in the spatial operation) :
    SELECT SUM(fact.quant) as SUM_quant, instalacao.name as Name
    FROM fact, instalacao, layer_region, emissao
    WHERE fact.instalacao_id = instalacao.instalacao_id AND fact.emissao_id = emissao.emissao_id AND SDO_INSIDE (instalacao.glocal, layer_region.geom)='TRUE'
    GROUP BY instalacao.instalacao_id, instalacao.name, emissao.poluente
    ORDER BY instalacao.instalacao_idthe database apparently gets "stuck" in a loop, and when I cancel it I get the following error:
    ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
    ORA-06512: at "MDSYS.MD", line 1723
    ORA-06512: at "MDSYS.MDERR", line 8
    ...I can't understand what I'm doing wrong as the "emissao" table is not used in any spatial operation.
    Any ideas please?
    Thanks in advance,
    ~Ruben

    Although I'm not a 'Spatial guy', maybe you can interprete the action you need to take on the error:
    ORA-13268: error obtaining dimension from USER_SDO_GEOM_METADATA
    Cause: There is no entry in the USER_SDO_GEOM_METADATA view for the specified geometry table.
    Action: Insert an entry for the destination geometry table with the correct dimension information.
    (http://download.oracle.com/docs/cd/B19306_01/server.102/b14219/e12700.htm#sthref3918)

Maybe you are looking for