How to use java to store the MultiPolygon

I fell victim of the problem of ORA-00939 of too many arguments when you insert a geometry object in the database and find details on the forum to use java to insert it instead. The code was:

Double [] coords = new double [10000];
for (int i = 0; i < coords.length; i ++)
Coords [i] =...;

JGeometry mypoly = JGeometry.createLinearPolygon (coords, 2 / * dimensions * /, 8256);

PreparedStatement ps = connection.prepareStatement ("insert into States values (?)");
convert JGeometry instance DB STRUCT
STRUCT obj = JGeometry.store (mypoly, connection);
ps.setObject (1, obj);
PS. Execute();


The SDO_GEOMETRY I want to insert SDO_GTYPE 2007 East (collection of polygons) [in the example below, 2]
I can see in the code example where to put the SRID (8307), but nowhere in the code, and nowhere in the geometry of the class where I can create a MultiPolygon.
Anyone help with this?

As a secondary issue: some sites I put to date have a boundary defined by a polygon, some by more than one - SDO_GTYPE 2007 can be used for all, no matter how they are?




UPDATE SET SITE_BOUNDARY = MDSYS LOC. SDO_GEOMETRY)
2007,
8307,
SDO_POINT (60.49772542,-1.452049075, NULL)
MDSYS. SDO_ELEM_INFO_ARRAY (1,1003,1, 105,1003,1),
MDSYS. SDO_ORDINATE_ARRAY (50.49678550013553,-7.217321117344117,... < trimmed, you don't want to see all >...)
)
WHERE SITECODE = "970A 3";

Hello

Have you checked this:

http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14373/Oracle/Spatial/geometry/JGeometry.html#JGeometry_int__int__int___double _

the first parameter in the constructor is the gtype (in your case, 2007).

Luke

Tags: Database

Similar Questions

  • I got a license number for Adobe Master Collection from my school (Stevens Institute of Technology) and I can't understand how to use it to obtain the product. I created a user name and this is as far as I'm away.

    I got a license number for Adobe Master Collection from my school (Stevens Institute of Technology) and I can't understand how to use it to obtain the product. I created a user name and this is as far as I'm away. I need to download the product and I may not know where to start.

    Ask someone to your school... You have a Cloud redemption code, or a number of series CS6?

    If cloud, http://helpx.adobe.com/x-productkb/global/redemption-code-help.html Redemption Code and

    http://www.Adobe.com/products/creativecloud/FAQ.html

    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall

    http://forums.Adobe.com/community/download_install_setup/creative_cloud_faq

    What is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    To start https://helpx.adobe.com/creative-cloud.html the Cloud

    If CS6, download to other downloads and enter your serial number when prompted

    Once again, your 1 resource is your school

  • How to use JavaScript to change the named view

    How to use JavaScript to change the named view

    Do you mean to jump to a specific Destination named within a PDF file? SE so there

    the method gotoNamedDest of the Document object.

  • How to use CSS to create the horizontal navigation bar in Dreamweaver CS6

    How to use CSS to create the horizontal navigation bar in Dreamweaver CS6

    One of the ways to do this is the following: Editor Tryit v1.9

    You can also use floats to get something in the same direction.

  • How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    Here's the working solution

    Please rename all the boxes like chkBox0, chkBox1... .chkBox30 (must start with 0)

    Value of exports of each checkbox must be "Yes" (default value is Yes)

    Place this Code at the level of the Javascript Document

    -Code JavaScript document-

    var counter = 0;                Checked the meter

    -Count boxes checked again when the document is closed and reopened.

    for (var i = 0; i)<= 30;="">

    If (getField("chkBox"_+_i).value == 'Yes') {}

    Counter += 1;

    }

    }

    -The function of validation-

    function validateCheckBox(name,value) {}

    If (value == 'Yes' & meter)<>

    Counter += 1;

    } else if (value == 'Off') {}

    counter = 1;

    } else {}

    getField ("name") .value = "Off";

    App.Alert ("you can select only four checkboxes");

    }

    }

    -End of Document Javascript-

    Now put this line in the MouseUp event all checkboxes

    Box - Code MouseUp event.

    validateCheckBox (event.target.name, event.target.value);

    //----------------------------------------------------------------------------------

    Hope this will help

    Kind regards

    Post edited by: Mohammad Irfan

  • How to use Java (JRE).

    Hi all

    How to use java (JRE) with a form rather than Java Jinitiator? can someone guide me? Quick response will be greatly appreciated.

    Sarah

    You can also use this article

    François

  • BlackBerry Smartphones BlackBerry Pearl 8100 how to use Java Apps (.jad/.jar)

    OK, I have like 5 or more applications and games on my memory card Blackberry Pearl 8100 not not started then the difference of "Nokia" and when I try 2 install it using the desktop program thingie provided with Blackberry, where you can for example manage media and the program called application loader that is not Java applications how to Blackberry as he tells me he uses Java [If you go to 'options', 'about' [u would get some info, and it shows me the Java logo and that this device IS POWERED TESTED CONTAINING JAVA AND SUN MICRO SYSTEMS INC. JAVA VIRTUAL MACHINE COMPATIBLE SOFTWARE.] But I had no experience using Java on Blackberry what So Ever.

    Please help me and please don't tell me that it won't work, I just got this phone! ??

    Oh really dang can you atleas may explain wats the use of Java on the Blackberry please!

  • How to use resource element in the xml file in the workflow?

    Good afternoon

    In my workflow, I put a parameter of the attribute with the element of resource type and the value of the attribute is an xml file.

    And I had a problem with xml files in my workflow, I would like to use the information in the xml file to store in the variable...

    Example: in the xml file, I put some information about the number of VLAN ID, and in my script task, I would like to know how is used with myvariable.portgroup [0].spec.vlanId?

    Best regards.

    Like this:

    var myXml = new XML(resource.getContentAsMimeAttachment().content);
    

    You can then access your nodes like this:

    myXml.node.subnode

    Google for e4X to get the syntax complete.

  • How to use java with apex

    Hi all

    I m using apex 4.1 and the East * 11 g oracle database * I want to know how to use the java (servlet, jsp, all java in the apex technologies) and what I need to do to use java in the apex please guide me


    Thanks and greetings
    Akram

    Hello
    >
    How to configure the web server with the apex listener and what are the requirements,
    >
    You can find details here.http://www.oracle.com/technetwork/developer-tools/apex-listener/documentation/index.html

    Note that the Apex and ApexListener are two totally different things.

    Kind regards

  • How to generate Java classes during the generation of the WebService Datacontrols?

    Hello

    I use data controls generated by the web service in my application, but I am stuck at a point where I got a requirement to create a Java bean for the complex type. There's no java class created when we create data controls using the web service.

    I need to grasp the object of return type of a method of data control (example: I need to capture the Department object that is returned by the getDetartment method) to validate the data.

    The XML files are created in the template while creating web service data controls. How to generate java classes out of it?

    Please can someone help out of this?

    I hope you understand my question.

    Please let me know if you want more details about me.

    Thanks and greetings
    Thoom

    Hello

    If this is your condition using a WS client proxy class and create a POJO to data control (right click). The WS data control generates classes and uses instead of XML schema definitions

    See example at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html 073

    Frank

  • Satellite L550-117 - how to use VGA + HDMI at the same time?

    Hello
    I have a Satellite/Satellite L550 series Satellite L550 - 117.
    Can I use 2 monitors at the same time, using the function key (laptop screen + HDMI, VGA + HDMI, VGA, portable computer), but I would use "laptop screen", "VGA output" + "Output HDMI" at the same time (for example: to play a movie on an HD TV and work on the other two screens).
    I also want to play sounds on computer speakers 'and' an HDMI output, not the speakers for computer 'or' HDMI.

    Is it possible with this notebook and how?

    Thank you

    Hey Buddy,

    Good idea you have unfortunately it of not possible to use 3 monitors at the same time. You can use the internal monitor and an external monitor but not the two external monitors. This is not supported in the graphics card.

    Then, you use internal monitor, VGA connection or internal monitor + HDMI connection. That s what you can do.

  • How to use Labview for measuring the reflectance at different wavelengths automatically

    Hello!

    I'm using labview to communicate with MS257 (a monochromator). If I do not use Labview, I have to use the hand controller (set a wavelength from 300 to 1100 under a grating (a total of four grids).) It takes a lot of time. So I want to use labview to realize the automation. But I don't know how to do, I still can put only a wavelength as a command for MS257, not making any difference.

    Does anyone know how to deal with this?

    Thank you for your time.

    So where are you stuck? It is a fairly common task. Inside of a loop, you can increment the "xxx" and build a table of responses. Look at the Format function in the chain and a knot of shift register/feedback.

  • How to use NIDAQmx to determine the number of lines correlated DIO?

    How can I used NIDAQmx to determine the number of correlated DIO lines that supports a device?  For example, the NI6225 supports 8 correlated digital of/s lines while the NI6229 supports 16 correlated digital of/s lines.  How can I used NIDAQmx to determine the NI6225 supports only 8 lines while the NI6229 supports 16 lines?

    I moved this question from a previous thread.

    Thank you

    Ian

    Here is a code snippet that implements the regular expression detection:

  • How to use a structure of the event in a Subvi

    I am using a structure of the event within a Subvi.  The Subvi has a table constructor that built tables and the structure of the event is used so that when the program runs, it allows you to change the elements of the array.  It works, but when I apply within a Subvi, it does not work properly.  This goes into a Subvi, because it will be part of a much larger progrram, so it must be modular.

    If you are using a structure of the event, it is not a Subvi.  If you worry about modularity, you should not use the structure of the event.

    You seem to have a fundamental misunderstanding of modularity.  An event structure must be placed in a while loop.  If you have a while loop in a Subvi, you have transferred control of your program to the Subvi.  You are not at this stage modular.  Your higher level GUI has no control.  You would have to create a stupid system of variables to pass data down to the loop to stop the loop and return to your main VI.  This is not a good design decision.

    Instead of searching for a way to make something broken, you should spend effort trying to understand what you really want to accomplish.  You should also spend some time to learn how to work the event structures.

    This application is small at the moment and it is already on the way to the unreadable.  It's a terrible thing to do for you.  Break these habits now.  variables are only when absolutely necessary.  Using subVIs to accomplish individual tasks, do not run the entire application.  With the structures of the event, use a value of stop button change event for will not be held hostage to the time-out.  If your variable is '2' in it, you're doing something wrong.  It has to be something different between set points, put it in the name.  If you want to make the subVIs, create an icon.

    But first and foremost, invest time in understanding dataflow

  • How to use Labview to control the motorized turntable?

    Hello

    I am new to Labview and do a project that requires the use of labview to control the motorized turntable (XYZ axes). I need to use the Labview programming and have no idea at all. Need help, thank you very much!

    Lei,

    Everything said by others is correct and to do because they describe, at a given time. But I always approached these projects of motion control first by looking at the 'motion controller' (I hope you have a) and 'drivers' (what you need) between the computer/LabVIEW and engines decide what communications will be required for these devices and get an idea of the syntax of command and the language to use with them.  In some cases, the controller and the motor driver are integrated in a single unit. Heck, in some cases, they are even integrated with each engine.

    The motors can be the stepper motors or perhaps servomotors.

    In the case of drivers stepper (devices that provide power electronics to run the engines), many of them are run using only two control signals for digital called 'step' (a pulse train) and 'direction' (high-low level) and if it is possible to generate directly with the PC, it's an order of magnitude easier (if you have not already a library of available motion control to manage the generation of these signals and) the execution of the stepper motors) of having a "Motion Controller" between the PC and the "motor".  Engine drivers step by step usually can be configured that current engine and the size of the stage and sometimes for the other plus-moteur/driver-parameter setting. The configuration of these can be made with jumpers, switches or, for some drivers, with orders ASCII on some sort of port of communication, but in general these are values you download the installer once at the beginning and then never touch again if you do not need generally to have a full time available on their change communication path.

    In the case of the actuator drivers (once again the devices that provide power electronics to run the engines), many use a +/-10V control input analog signal, and, again, while it is possible to generate the signal directly with the PC hardware, a separate axes controller is usually much simpler and more robust.  In the case of a servo system, there is also a signal back to an encoder or resolver attached to the engine to be used by any device will exercise the motion controller in the system.  There are once again associated with the driver configuration parameters (and controller in this case, since it is part of the servo feedback loop) which must be configured at the start but once set up properly, they rarely need to be changed again.

    A movement controller which is separated from the PC often manage several drivers, and can often coordinate a movement between them. It will load the rise up/down of the engine speed as that changes. It will be followed by position of each motor. The servo system, but it will take the feedback signal and use it to adjust the speed/position/torque of the engine. The motion controller also deal with race and home or index of signals is usually on most lines of movement and provide information of the State of the switch to the PC.   To run the motor controller is then just a matter of chaining a set commands of (usually ASCII) to indicate how fast to run and how far to go (and direction) and by sending a command "do it." Then, ask you to keep track of the status of the process and the States of the switches.

    In many cases the builders of controllers of movement are a primitive way to communicate with the controllers of a PC with no additional software other than what they offer. With this you can at least have an idea of how different the controller commands and responses they produce. That you can start to build sequences of commands to perform the actions you want.

    You can then add LabVIEW to the mix and to understand how you can get it to send sequences of similar orders on the paths of communication that are available and respond intelligently to the information it receives in return for motion control.

Maybe you are looking for

  • Pavilion 17-e110sh: missing 17-e110sh HP Pavilion driver

    Dear HP! Please help me find the drivers for my laptop. The drivers listed below are missing for my Pavilion e110sh 17. For this HP laptop only provide windows 8 drivers, but I have to use windows 7.  Hardware ID: USB controller + some pci device (ju

  • locked mini 311 HP BIOS

    I just bought a computer hp mini 311 and when I turn it on it asks for a password... disabled system is-63381783 code

  • BlackBerry Blackberry Storm Smartphones - phone calls, I can't hear what people are saying?

    Hello This has been happening frequently, one minute everything is good with phone calls, then the next time I try to use the phone, the people at the other end can hear me, but I cannot hear them, not matter if they ring me or I ring their.  The onl

  • BlackBerry Smartphones Activation Code Faile

    I recently had to swap devices and have reinstalled the latest version of the app world. I've logged in my world and re installed my previously purchased app Weatherbug Elite. After installing weatherbug elite, I enter the license code provided in my

  • I want to put lightroom 6 from my old computer to my new

    Hello! I have Adobe Photoshop Lightroom 6 of Best Buy on October 2015. 6 of Lightroom is a cd. I installed it on my Pc and now I am looking to buy a Mac. I was wondering if I could uninstall on my pc and put it on the mac? How would this work?