Package gov.nasa.worldwind.formats.shapefile

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


            boolean blnIsGeometryLonLat,
            String strKeyLocationClass) throws Exception
    {
       for (int i=0; i< this._altRec.size(); i++)
         {
             ShapefileRecord sfrCur = this._altRec.get(i);
            
             // ----
             String strValueLabelCandidate = (String) sfrCur.getAttributes().getValue(strKeyLabel);
            
             if (strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1)
             {
                 String str = "strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1";
                 GfrPnlContentsOkImportShapeTimestampPoint2d._LOGGER_.severe(str);
                 throw new Exception(str);
             }
            
             String strValueLabelUnique = strValueLabelCandidate.trim();
            
             // ---
             String strValueLocationClass = "none";
            
             if (strKeyLocationClass!=null && strKeyLocationClass.length()>0)
             {
               strValueLocationClass = (String) sfrCur.getAttributes().getValue(strKeyLocationClass);

               if (strValueLocationClass==null || strValueLocationClass.trim().length()<1)
                  strValueLocationClass = "none";
               else
                  strValueLocationClass = strValueLocationClass.trim();
             }
            
             // ----
            
             String strValueTimestamp = (String) sfrCur.getAttributes().getValue(strKeyTimestamp);
            
             if (strValueTimestamp==null || strValueTimestamp.trim().length()<1)
             {
                 String str = "strValueTimestamp==null || strValueTimestamp.trim().length()<1";
                 GfrPnlContentsOkImportShapeTimestampPoint2d._LOGGER_.severe(str);
View Full Code Here


            boolean blnIsGeometryLonLat,
            String strKeyLocationClass) throws Exception
    {
       for (int i=0; i< super._altRec.size(); i++)
         {
             ShapefileRecord sfrCur = super._altRec.get(i);
            
             // ----
             String strValueLabelCandidate = (String) sfrCur.getAttributes().getValue(strKeyLabel);
            
             if (strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1)
             {
                 String str = "strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1";
                 GfrPnlContentsOkImportShapeTimestampPoint2d._LOGGER_.severe(str);
                 throw new Exception(str);
             }
            
             String strValueLabelUnique = strValueLabelCandidate.trim();   
            
             // ---
             String strValueTimestamp = (String) sfrCur.getAttributes().getValue(strKeyTimestamp);
            
             if (strValueTimestamp==null || strValueTimestamp.trim().length()<1)
             {
                 String str = "strValueTimestamp==null || strValueTimestamp.trim().length()<1";
                 GfrPnlContentsOkImportShapeTimestampPoint2d._LOGGER_.severe(str);
                 throw new Exception(str);
             }
            
             strValueTimestamp = strValueTimestamp.trim();
            
             // ---
             String strValueLocationClass = "none";
            
             if (strKeyLocationClass!=null && strKeyLocationClass.length()>0)
             {
               strValueLocationClass = (String) sfrCur.getAttributes().getValue(strKeyLocationClass);

               if (strValueLocationClass==null || strValueLocationClass.trim().length()<1)
                  strValueLocationClass = "none";
               else
                  strValueLocationClass = strValueLocationClass.trim();
View Full Code Here

           String strWarning = "No valid records found in file";
           strWarning += "\n" + fle.getAbsolutePath();
           throw new Exception(strWarning);
        }
       
        ShapefileRecord sfr1 = super._altRec.get(0);
        DBaseRecord brd = sfr1.getAttributes();
       
        Set<Map.Entry<String, Object>> setAttributes = brd.getEntries();
       
        if (brd == null)
        {
View Full Code Here

           String strKeyUrl,
           boolean blnIsGeometryLonLat) throws Exception
   {
      for (int i = 0; i < this._altRec.size(); i++)
      {
         ShapefileRecord sfrCur = this._altRec.get(i);

         // ----
         String strValueLabelCandidate = _getValueLabel(sfrCur, strKeyLabel);

         String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);

         if (strValueLabelUnique == null)
         {
            String str = "by-passing duplicated label name: " + strValueLabelCandidate;
            GfrPnlContentsOkImportShapeTloPoint2dAlone._LOGGER_.warning(str);
            GfrOptionPaneAbs.s_showDialogWarning(null, str);
            continue;
         }

         // ----
         String strValueDescription = null;

         if (strKeyDescription != null && strKeyDescription.trim().length() > 0)
            strValueDescription = (String) sfrCur.getAttributes().getValue(strKeyDescription);

         // ----
         String strValueUrl = null;

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

         // ---

         Point2D.Double p2dLonLat = super._getValueLonLatPoint2doubleFromPoint(
                 sfrCur, blnIsGeometryLonLat, i);
View Full Code Here

           String strKeyUrl,
           boolean blnIsGeometryLonLat) throws Exception
   {
      for (int i = 0; i < this._altRec.size(); i++)
      {
         ShapefileRecord sfrCur = this._altRec.get(i);

         // ----
         String strValueLabelCandidate = _getValueLabel(sfrCur, strKeyLabel);

         String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);

         if (strValueLabelUnique == null)
         {
            String str = "by-passing duplicated label name: " + strValueLabelCandidate;
            GfrPnlContentsOkImportShapeTloPoint2dAlone._LOGGER_.warning(str);
            GfrOptionPaneAbs.s_showDialogWarning(null, str);
            continue;
         }

         // ----
         String strValueDescription = null;

         if (strKeyDescription != null && strKeyDescription.trim().length() > 0)
            strValueDescription = (String) sfrCur.getAttributes().getValue(strKeyDescription);

         // ----
         String strValueUrl = null;

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

         Point2D.Double p2dLonLat = super._getValueLonLatPoint2doubleFromMultiPoint(
                 sfrCur, blnIsGeometryLonLat, i);
        
         // ---
View Full Code Here

      String strKeyDescription = ((GfrPnlSettingsImportFileShapeTlo) super._pnlSettings).getValueKeyDescription();
      String strKeyUrl = ((GfrPnlSettingsImportFileShapeTlo) super._pnlSettings).getValueKeyUrl();

      for (int i = 0; i < super._altRec.size(); i++)
      {
         ShapefileRecord sfrCur = super._altRec.get(i);

         // ----
         String strValueLabelCandidate = (String) sfrCur.getAttributes().getValue(strKeyLabel);

         if (strValueLabelCandidate == null || strValueLabelCandidate.trim().length() < 1)
         {
            String str = "strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1";
            GfrPnlContentsOkImportShapeTloLineClosedVar._LOGGER_.severe(str);
            throw new Exception(str);
         }

         String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);

         if (strValueLabelUnique == null)
         {
            String str = "by-passing duplicated label name: " + strValueLabelCandidate;
            GfrPnlContentsOkImportShapeTloLineClosedVar._LOGGER_.warning(str);
            GfrOptionPaneAbs.s_showDialogWarning(null, str);
            continue;
         }



         // ----
         String strValueDescription = null;

         if (strKeyDescription != null && strKeyDescription.trim().length() > 0)
            strValueDescription = (String) sfrCur.getAttributes().getValue(strKeyDescription);

         // ----
         String strValueUrl = null;

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



         // ----

         SurfacePolygons shape = new SurfacePolygons(
                 Sector.fromDegrees(((ShapefileRecordPolygon) sfrCur).getBoundingRectangle()),
                 sfrCur.getCompoundPointBuffer());

         Iterable<? extends LatLon> corners = shape.getLocations();

         ArrayList<LatLon> list = new ArrayList<LatLon>();
View Full Code Here

        String strKeyDescription = ((GfrPnlSettingsImportFileShapeTlo) super._pnlSettings).getValueKeyDescription();
        String strKeyUrl = ((GfrPnlSettingsImportFileShapeTlo) super._pnlSettings).getValueKeyUrl();

         for (int i=0; i<this._altRec.size(); i++)
         {
             ShapefileRecord sfrCur = this._altRec.get(i);
            
             // ----
             String strValueLabelCandidate = (String) sfrCur.getAttributes().getValue(strKeyLabel);
            
             if (strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1)
             {
                 String str = "strValueLabelCandidate==null || strValueLabelCandidate.trim().length()<1, record #" + i+1;
                 GfrPnlContentsOkImportShapeTloLinesOpen._LOGGER_.severe(str);
                 throw new Exception(str);
             }
            
             String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);
            
             if (strValueLabelUnique == null)
             {
                 String str = "by-passing duplicated label name: " + strValueLabelCandidate;
                 GfrPnlContentsOkImportShapeTloLinesOpen._LOGGER_.warning(str);
                 GfrOptionPaneAbs.s_showDialogWarning(null, str);
                 continue;
             }
            
            
            
             // ----
             String strValueDescription = null;
            
             if (strKeyDescription!=null && strKeyDescription.trim().length()>0)
                strValueDescription = (String) sfrCur.getAttributes().getValue(strKeyDescription);
            
             // ----
             String strValueUrl = null;
            
             if (strKeyUrl!=null && strKeyUrl.trim().length()>0)
                strValueUrl = (String) sfrCur.getAttributes().getValue(strKeyUrl);
            

            
             // ----
            
View Full Code Here

           String strWarning = "No valid records found in file";
           strWarning += "\n" + fle.getAbsolutePath();
           throw new Exception(strWarning);
        }
       
        ShapefileRecord sfr1 = super._altRec.get(0);
        DBaseRecord brd = sfr1.getAttributes();
       
        if (brd == null)
        {
            String str = "brd == null, fle.getAbsolutePath()=" + fle.getAbsolutePath();
            GfrPnlContentsOkImportShapeTloLinesOpen._LOGGER_.warning(str);
View Full Code Here

           String strWarning = "No valid records found in file";
           strWarning += "\n" + fle.getAbsolutePath();
           throw new Exception(strWarning);
        }
       
        ShapefileRecord sfr1 = super._altRec.get(0);
        DBaseRecord brd = sfr1.getAttributes();
       
        Set<Map.Entry<String, Object>> setAttributes = brd.getEntries();
       
        if (brd == null)
        {
View Full Code Here

TOP

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

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.