Package gov.nasa.worldwind.formats.shapefile

Examples of gov.nasa.worldwind.formats.shapefile.ShapefileRecordPolyline


                  throw new Exception(strLog);

               continue;
            }
           
            ShapefileRecordPolyline pol = (ShapefileRecordPolyline) record;
           
            int intNbParts = pol.getNumberOfParts();
           
            if (intNbParts != 1)
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
                  continue;
               }
              
               String strLog = "intCount=" + intCount + ", " + "intNbParts != 1, intNbParts=" +
                        intNbParts + ", intNbRecord=" + intNbRecord;
              
               OurShapefileLoaderLineOpen._LOGGER_.warning(strLog);
              
               String strMessage = "Got wrong number of polylines in record #" + intCount;
               strMessage +="\n";
              
               strMessage += "Expecting one, got " + intNbParts;

              _INT_CHOICE_WARNING_ = JOptionPane.showOptionDialog(null, strMessage, "Warning",
                  JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE,
                  null, _STRS_OPTION_WARNING_, _STRS_OPTION_WARNING_[0]);

               if (_INT_CHOICE_WARNING_ == 0)
                  throw new Exception(strLog);

               continue;
            }
           
            int intNbPoints = pol.getNumberOfPoints();
           
            if (intNbPoints < 2)
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
View Full Code Here


             if (strKeyUrl!=null && strKeyUrl.trim().length()>0)
                strValueUrl = (String) sfrCur.getAttributes().getValue(strKeyUrl);
    
             // ----

             ShapefileRecordPolyline pol = (ShapefileRecordPolyline) sfrCur;
            
             int intNbParts = pol.getNumberOfParts();
            
            
             if (intNbParts != 1)
             {
                String strLog = "intNbParts != 1, intNbParts=" + intNbParts + ", record #" + (i+1);
                GfrPnlContentsOkImportShapeTloLineOpen._LOGGER_.warning(strLog);
               
                String strMessage = "Record # " + (i+1);
                strMessage += " does not contain only one polyline, found: " + intNbParts;
                strMessage += "\n\nAborting";
 
                 throw new Exception(strMessage);
             }
            
             // ----
            
            
             ArrayList<Point2D.Double> alt = new ArrayList<Point2D.Double>();
            Iterable<double[]> itrDoublesCur = pol.getPoints(0);

            for (double[] dbls : itrDoublesCur)
            {
               //MEMO : working with lon lat
               Point2D.Double p2dCurLonLat = null;
View Full Code Here

             // ----
            
             ArrayList<ArrayList<Point2D.Double>> alt = new ArrayList<ArrayList<Point2D.Double>>();
            
            
             ShapefileRecordPolyline pol = (ShapefileRecordPolyline) sfrCur;
            
             int intNbParts = pol.getNumberOfParts();
            
             if (intNbParts < 1)
             {
                 System.out.println("intNbParts < 1, i=" + i + ", ignoring");
                 continue;
             }
            
             for (int j=0; j<intNbParts; j++)
             {
                 ArrayList<Point2D.Double> altPartCur = new ArrayList<Point2D.Double>();
                 Iterable<double[]> itrDoublesCur = pol.getPoints(j);
                
                 for (double[] dblsPoint : itrDoublesCur)
                 {
                    //Memo working with Lon Lat
                     Point2D.Double p2dLonLat = null;
View Full Code Here

TOP

Related Classes of gov.nasa.worldwind.formats.shapefile.ShapefileRecordPolyline

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.