How to check if JGeometry is line or polygon?

Hi!
I'm trying to discern wether a JGeometry I have is a point, a line or a polygon. JGeometry has a method isPoint() to check if it's a point, but I don't see any similar methods for lines or polygons. Only isCircle() or isRectangle() or is LRSGeometry().
Currently I'm using getOrdinatesArray() and checking if the first pair is the same as the last. This is obviously not ideal, since a line could very well end up in the same place as its origin.
Ideas?
Thanks!

You can use the getType method to get the type of JGeometry.
This is what it will return:
* GTYPE_POINT = 1;
* GTYPE_CURVE = 2;
* GTYPE_POLYGON = 3;
* GTYPE_COLLECTION = 4;
* GTYPE_MULTIPOINT = 5;
* GTYPE_MULTICURVE = 6;
* GTYPE_MULTIPOLYGON = 7;
siva

Similar Messages

  • Want to know how to check for new line character in text file

    Hi All,
    I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
    Thanks
    static int readandwriteFile(Logger logger,String filepath){
              BufferedWriter out = null;
              BufferedReader in = null;
              File fr = null;
              int get_count = 0;
              try     {
              if(new File(filepath).exists())
              fr= new File(filepath);
                        System.out.println("FileName: "+fr);
                   if(fr != null){
    in = new BufferedReader(new FileReader(fr));
                             String text = in.readLine();
                             if(text != null){
                             get_count = Integer.parseInt(text);
                             in.close();
                             else{
                                  get_count = 0;
         else{                    
    out = new BufferedWriter(new FileWriter(filepath));
         out.write("0");
                out.close();
                   }          //Reading of the row count file ended.
              catch(Exception e) {
                   e.printStackTrace();
              finally {
                   try{               if (in != null) {
                             in.close();
              if (out != null) {
                             out.close();
              catch(Exception e) {
                        e.printStackTrace();
              return get_count;
         }

    You are calling the readline() only once which means you are reading only the first line from the file...
    Use a loop (Do-While preferably)
    do{
    //your code
    }while(text == "")

  • How to check plan line items for plan cost at network activity level?

    Dear all,
    How to check plan line items for plan cost at network activity level? The plan cost is done in network activity in CJ20N.
    I am not able to check using CJI4 or CJI9 report.
    Kindly advise.
    Thanks and regards,
    Jessie

    Hi Jess,
    Have you checked the navigation part which is being displayed on left hand side of report S_ALR_87013565 and S_ALR_87013533.? There you have option to check transaction currency and object currency when you double click on it.
    In case if it is not being displayed under navigation. Then you can bring them on from transaction code CJE2. For eg: Report group for S_ALR_87013533 is 12KST1C. Double click on it and it will open up to do changes in report layout and many more. There you also have options to bring on transaction currency too. Similarly, you can check for other report groups as well just by checking the report description.
    But I am not sure if suits your requirements. Wait for other experts to comment on this.
    Regards,
    Amit

  • How to check schedule line PO text before PO saving.

    How can i check the schedule line PO text before po saving. My idea is add a trigger in user exits. but i don't know how to check this data. I can't check the table stxh or stxl because those data are stored after PO saved. I think before that the data is stored in memory or somewhere. Could you give me some advise? thanks

    Hi
    Search for a correct user exit or BADI and you can check the text of the PO schedule line
    Use the READ_TEXT fun module to fetch the text by passing the parameters OBJECT,OBJECTNAME,ID and LANGUAGE and fetch it and check it
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to check system status from Windows command line?

    Does anyone has an idea how to check system status from Windows command line? In UNIX we use startsap check, unfortunately I didn't find an appropriate command provided by SAP.
    The only idea we have is to use
    tasklist /FI "Username eq SAPService<SID>" | find "disp+work"
    which isn't as nice as startsap check.

    Hi,
    In windows you can use the command
    go to profile directory in command prompt and the give the following command to check the status of the instance.
    sapstart check pf=START_DVEBMGS<nr>_<hostname>
    that means you need to mention start profile or instance profile. So that it will say whether the instance is running or not.
    If you want any other information please reply back to me.
    Thanks,
    Chaitanya.

  • How to Check Creation/Change data for PO Service Line item

    Hi, I was wondering what field(s) from what table(s) I would have to check if I wanted a report to look for the creation or chnaged date of a specific service item in a PO?
    Currently it is using the EKPO-AEDAT field to check if a PO line item has been changed, but I would like to narrow it down to just some service line items instead of capturing all the service lines in a recently changed PO line item.
    Thank you very much in advance for the advice!

    Hi Rashid, thanks for the advice, but it doesn't really solve my problem.
    What I want to know is if there is a field where the date of a service item was created in a PO line item is stored, so that an ABAP report can be written to retrieve newly created service items from POs.

  • How to execute ATP check and update schedule lines for existing sales order

    Hello all,
    After stock quantity has been updated, we’d like to perform ATP check and update schedule lines for sales documents which have not been delivered yet.
    Is BAPI_SALESDOCUMENT_CHANGE useful to do so?
    If so which fields should I set ‘X’?
    At the moment, I called BATCH INPUT and execute ATP check.
    But I'm wondering if this is not a smart way.
    Thank you
    Yuko

    Hi arnab
      one way of achieving your requirements is
    after creating the sales order you can execute the SALEs order MRP using MD50 transaction enter the order # and MRP control parameters 1,3,1,2. and execute.
    Ensure the following before MRP.
    1. All the master data are maintained for the schedule line creation for the components ( Source list, Scheduling agreements)
    2. Material master with valid MRP data.strategy group having MTO strategy.
    after sales order MRP you will get the schedule line created for the components
    also MRp will create the cpacity requirements as we run the MRP with Lead time scheduling.
    Hope this helps
    SK
    Reward your points

  • How to check vendor payment

    Hi gurus,
    how to check vendor payment is done are not in purchase order
    Regards
    murali

    Check through FBL1N vendor line item display, here you can check for the vendor libality generated during invoice (MIRO) posting once you get into the t-code FBL1N select the radio button open items only in line item selection give your vendor account, company code date (Key day at which the line items are open till now), and execute.
    In the report screen to help your self you can search using crtl + F and put reference as serach criteria.
    You will see the non cleared item the Status indicator tells you the line item is not yet cleared.
    BR

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • How can I input read a line from a file and output it into the screen?

    How can I input read a line from a file and output it into the screen?
    If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
    Any help will be appreciate!
    ======START FILE default.html ========
    <html>
    <body>
    <br><br>
    <center>
    <font size=4 face=arial color=#336699>
    <b>Welcome to a DerekTran's Website!</b><br>
    Underconstructions.... <br>
    </font> </center>
    <font size=3 face=arial color=black> <br>
    Hello,<br>
    <br>
    I've been using the PWS to run the website on NT workstation 4.0. It was working
    fine. <br>
    The URL should be as below: <br>
    http://127.0.0.1/index.htm or http://localhost/index.htm
    <p>And suddently, it stops working, it can't find the connection. I tried to figure
    out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
    know what's going on? Please see the link for more.... I believe that I setup
    everything correctly and the bugs still flying in the server.... <br>
    Thank you for your help.</P>
    </font>
    <p><font size=3 face=arial color=black>PeerWebServer.doc
    <br>
    <p><font size=3 face=arial color=black>CannotFindServer.doc
    <br>
    <p><font size=3 face=arial color=black>HOSTS file is not found
    <br>
    <p><font size=3 face=arial color=black>LMHOSTS file
    <br>
    <p><font size=3 face=arial color=black>How to Setup PWS on NT
    <BR>
    <p><font size=3 face=arial color=black>Issdmin doc</BR>
    Please be patient while the document is download....</font>
    <font size=3 face=arial color=black><br>If you have any ideas please drop me a
    few words at [email protected] </font><br>
    <br>
    <br>
    </p>
    <p><!--#include file="Hits.asp"--> </p>
    </body>
    </html>
    ========= END OF FILE ===============

    Hi!
    This is a possible solution to your problem.
    import java.io.*;
    class AddressExtractor {
         public static void main(String args[]) throws IOException{
              //retrieve the commandline parameters
              String fileName = "default.html";
              if (args.length != 0)      fileName =args[0];
               else {
                   System.out.println("Usage : java AddressExtractor <htmlfile>");
                   System.exit(0);
              BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
              StreamTokenizer st = new StreamTokenizer(in);
              st.lowerCaseMode(true);
              st.wordChars('/','/'); //include '/' chars as part of token
              st.wordChars(':',':'); //include ':' chars as part of token
              st.quoteChar('\"'); //set the " quote char
              int i;
              while (st.ttype != StreamTokenizer.TT_EOF) {
                   i = st.nextToken();
                   if (st.ttype == StreamTokenizer.TT_WORD) {          
                        if (st.sval.equals("href")) {               
                             i = st.nextToken(); //the next token (assumed) is the  '=' sign
                             i = st.nextToken(); //then after it is the href value.               
                             getURL(st.sval); //retrieve address
              in.close();
         static void getURL(String s) {     
              //Check string if it has http:// and truncate if it does
              if (s.indexOf("http://") >  -1) {
                   s = s.substring(s.indexOf("http://") + 7, s.length());
              //check if not mailto: do not print otherwise
              if (s.indexOf("mailto:") != -1) return;
              //printout anything after http:// and the next '/'
              //if no '/' then print all
                   if (s.indexOf('/') > -1) {
                        System.out.println(s.substring(0, s.indexOf('/')));
                   } else System.out.println(s);
    }Hope this helps. I used static methods instead of encapsulating everyting into a class.

  • How to get rid of empty lines in a file?

    How can read a file "text.txt", delete all the empty lines and restore it to same filename "text.txt" without using a temporary file?

    Ages ago I ruined an 8" floppy disk drive by doing something similar to
    this: let b1 b2 ... bn nl be a series of blanks followed by a newline
    character (nl) and let c1 ... cm be a sequence of other characters. Let
    the total relevant sequence be:
    b1 b2 ... bn nl c1 ... cm
    Reverse the entire sequence: cm ... c1 nl bn ... b2 b1 and then
    reverse the first m bytes: c1 cm nl bn ... b2 b1. Now repeat the entire
    thing for the sequence c1 ... cm by checking for more blank lines in it.
    After this has all finished, simply truncate the file.
    The advantage of this method was that I only needed to be able to swap
    two bytes in a file; the disadvantage was that the floppy disk drive
    couldn't handle it ;-)
    kind regards,
    Jos

  • How to check paragraph in Reader document using API?

    Hi,
    When I extract the content of the PDF (Reader) document through .Net code, I could see only carriage return character ('\r') when it's a new line.
    But with '\r' character, I can not say whether it's normal new line or it's a paragraph.
    Please let me know if Adobe has got any API which can show how to differentiate between 'a new line' and 'a paragraph'.
    E.g.:
    Test Test Test
    Test Test Test  <- I can easily say it's start with a new line.
              Test Test Test Test Test
    Test Test Test Test Test Test.
              Test Test Test Test Test  <- This is a paragraph but how to check from the code?
    Test Test Test Test Test Test
    Test Test Test Test Test Test.

    We use 'PDDocCreateWordFinder' , 'PDWordFinderEnumWords' to extract the text from Adobe Reader document through Code, Not tool.
    But, by using these APIs, I can't see any difference in 'new line/row' or 'paragraph' if exists in PDF doc.
    I need such API which can give the exact format of Adobe Reader doc according to the content exists in that PDF doc.
    Thanks!

  • How to add a new schedule line?

    Hi folks,
    Please help to tell me is there any user exit can be used for adding a new schedule line? I want to keep the old first date data, add new shedule line with new updated schedule line date. Pls. help to advise how to do it in VA01/VA02 ?
    If i simply use the following update statement in MV45AFZZ, then the first date will be updated by the new Schedule line date, which is not what i want. (Since new order always the First line "0001" will get updated)
    xvbep-edatu = t_temp-edatu .
           modify xvbep TRANSPORTING edatu "UPDKZ
                         where posnr = t_temp-posnr
                           and ETENR = '0002'.
            if SY-SUBRC <> 0.
               modify xvbep TRANSPORTING edatu "UPDKZ
                            where posnr = t_temp-posnr.
            endif.
    Tks,
    Jenny
    Message was edited by:
            Jenny Zhuang

    Hi Ferry,
    Many thanks for the reply. But i still have the question, seems the user exit 'USEREXIT_CHECK_VBEP' in 'MV45AFZB' is used for addtional checks on the schedule line, my questions is how to add a new schedule line? It maybe very difficult. so is it possible to change the configurable Sales order's Finish Date for it's production order, and force it to generate a new schedule line?
    Tks,
    Jenny

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • How to view ACCNTS payble reconaccount Line Item wise after cheking tick

    I want to see the ACCOUNTS Payble RECONCILITION acoount LINE ITEM wise.
    I had seen the GL Master and their I found that The LINE ITEM was not Checked.
    later I had checked the Line Item Display, but Iam not able view the previous transactions Line Item Wise For that GL Account.
    1. Kindly suggest me how I can see the Previous Line Items after cheking the Line Item Disply.
    2. kindly Tell Me if I can Run any Programme.
    3.If its so what programme I can run and how.
    4. Is there any problem by checking the line item display to the GL account.
    Thanks In Advance
    I will definately reward the points
    Akash Narayana

    Hi,
    1. Enable Line Item Display in GL master.
    2. Block the GL for Posting in Company Code.
    3. Run the Program RFSEPA01.
    4. Check whether Line item details are available and then unblock the GL.
    Regards
    Hari

Maybe you are looking for

  • I can no longer hear all the music I have purchased on my phone.

    After a restore I had to do because my phone froze up, I am no longer able to hear all the music I purchased in the past.  When I select the music button from my screen, I select the songs button at the bottom of the screen and see everyone of them. 

  • Regarding the Components in the RWB

    HI Experts, In the RWB->>>Component Monitoring-->>> <u><b>Components</b></u>      Adapter Engine         System Landscape Directory         Integration Directory         Integration Repository         Runtime Workbench When Ever I Started the RWB The

  • Improve reports! (Parameter Grid .... to develop.....)

    Hi, I've been messing around the parameter grid in paper conception mode to realise that you cannot place an image in there... why? I've copied one from report paper layout and it went through. It's just its properties were torned out to 'TEXT' and i

  • To JDev Team:  Sorting in oracle.dacf.control.swing.GridControl ?!!

    My customers want to get caseInsensytive sorting in GridControl. Is it possible and what should I do for it? Thank you. [email protected]

  • Vaio SA bluetooth trouble

    I am having trouble getting my Vaio VPCSA3AFX to discover anything bluetooth. My other devices discover each other, but I can't seem to get my vaio to do the same. I am trying to connect by: Devices and printer > add device ... NO LUCK I have reinsta