Package gov.nasa.worldwind.formats.shapefile

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


       
        while (shp.hasNext())
        {
           intCount++;
          
            ShapefileRecord record = shp.nextRecord();
            int intNbRecord = record.getRecordNumber();
           
            String strTypeRecord = record.getShapeType();

            if (! Shapefile.isMultiPointType(strTypeRecord))
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
View Full Code Here


       
        while (shp.hasNext())
        {
           intCount++;
          
            ShapefileRecord record = shp.nextRecord();
            int intNbRecord = record.getRecordNumber();
           
            String strTypeRecord = record.getShapeType();

            if (! Shapefile.isPointType(strTypeRecord))
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
View Full Code Here

       
        while (shp.hasNext())
        {
           intCount++;
          
            ShapefileRecord record = shp.nextRecord();
            int intNbRecord = record.getRecordNumber();
            String strTypeRecord = record.getShapeType();

            if (! Shapefile.isPolylineType(strTypeRecord)) // !!!
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
View Full Code Here

       
        while (shp.hasNext())
        {
           intCount++;
          
            ShapefileRecord record = shp.nextRecord();
            int intNbRecord = record.getRecordNumber();
            String strTypeRecord = record.getShapeType();

            if (! Shapefile.isPolygonType(strTypeRecord)) // !!!
            {
               if (_INT_CHOICE_WARNING_ == 2) // ok, don't ask again
               {
View Full Code Here

        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;
                 GfrPnlContentsOkImportShapeTloLineOpen._LOGGER_.severe(str);
                 throw new Exception(str);
             }
            
             String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);
            
             if (strValueLabelUnique == null)
             {
                // !!!!!!!!!
                 String str = "by-passing duplicated label name: " + strValueLabelCandidate;
                 GfrPnlContentsOkImportShapeTloLineOpen._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);
    
             // ----

             ShapefileRecordPolyline pol = (ShapefileRecordPolyline) sfrCur;
            
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();
            GfrPnlContentsOkImportShapeTloLineOpen._LOGGER_.warning(str);
View Full Code Here

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

      // assuming homogeneous shapes in list
      // assuming at least one record
      ShapefileRecord sfrFirst = this._altRec.get(0);

      if (sfrFirst instanceof ShapefileRecordMultiPoint)
      {
         _doJobMultiPointUnique_(strKeyLabel, strKeyDescription, strKeyUrl, blnIsGeometryLonLat);
      }
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 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";
            GfrPnlContentsOkImportShapeTloLineClosedRect._LOGGER_.severe(str);
            throw new Exception(str);
         }

         String strValueLabelUnique = super._getUniqueLabel(strValueLabelCandidate);

         if (strValueLabelUnique == null)
         {
            String str = "by-passing duplicated label name: " + strValueLabelCandidate;
            GfrPnlContentsOkImportShapeTloLineClosedRect._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

       
        // MEMO: pending, altitude, direction, accelerometer
       
        // assuming homogeneous shapes in list
        // assuming at least one record
        ShapefileRecord sfrFirst = this._altRec.get(0);
       
        if (sfrFirst instanceof ShapefileRecordMultiPoint)
        {
           _doJobMultiPointUnique_(strKeyLabel, strKeyTimestamp, blnIsGeometryLonLat, strKeyLocationClass);
        }
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.