Exemple #1
0
        //**************************************************************//
        //********************  Simple Feature Assembly  ***************//
        //**************************************************************//

        protected Collection <? extends VPFFeature> doCreateSimpleFeatures(VPFFeatureClass featureClass)
        {
            if (this.primitiveData == null)
            {
                String message = Logging.getMessage("VPF.NoPrimitiveData");
                Logging.logger().severe(message);
                throw new IllegalStateException(message);
            }

            ArrayList <VPFFeature> results = new ArrayList <VPFFeature>();

            VPFBufferedRecordData featureTable = this.createFeatureTable(featureClass);

            if (featureTable == null)
            {
                return(null);
            }

            VPFBufferedRecordData joinTable     = this.createJoinTable(featureClass);
            Iterable <String>     attributeKeys = this.getFeatureAttributeKeys(featureTable);

            foreach (VPFRecord featureRow in featureTable)
            {
                VPFFeature feature = this.doCreateSimpleFeature(featureClass, featureRow, joinTable, attributeKeys);
                if (feature != null)
                {
                    results.add(feature);
                }
            }

            return(results);
        }
        public VPFSurfaceLine(VPFFeature feature, VPFPrimitiveData primitiveData)
        {
            String primitiveName = feature.getFeatureClass().getPrimitiveTableName();

            int[] primitiveIds = feature.getPrimitiveIds();

            this.sector            = feature.getBounds().toSector();
            this.buffer            = (VecBufferSequence)primitiveData.getPrimitiveCoords(primitiveName).slice(primitiveIds);
            this.referenceLocation = feature.getBounds().toSector().getCentroid();
        }
Exemple #3
0
        protected VPFFeature createFeature(VPFFeatureClass featureClass, VPFRecord featureRow,
                                           Iterable <String> attributeKeys,
                                           VPFBoundingBox bounds, int[] primitiveIds)
        {
            VPFFeature feature = new VPFFeature(featureClass, featureRow.getId(), bounds, primitiveIds);

            this.setFeatureAttributes(featureRow, attributeKeys, feature);

            return(feature);
        }