Get the feature shape for the database, table, and feature id

@param database  GeoPackage database
@param table     table name
@param featureId feature id
@return feature shape
@since 3.2.0
176157
public FeatureShape getFeatureShape(String database, String table, long featureId) {
        Map<Long, FeatureShape> featureIds = getFeatureIds(database, table);
        FeatureShape featureShape = getFeatureShape(featureIds, featureId);
        return featureShape;
    }
1079577
public List<String> getFeatureTablesForTileTable(String tileTable) {

		List<String> featureTables = new ArrayList<String>();

		List<FeatureTileLink> links = queryForTileTable(tileTable);
		for (FeatureTileLink link : links) {
			featureTables.add(link.getFeatureTableName());
		}

		return featureTables;
	}
786171
public FeatureIndexResults query() {
		FeatureIndexResults results = null;
		switch (getIndexedType()) {
		case GEOPACKAGE:
			long count = featureTableIndex.count();
			CloseableIterator<GeometryIndex> geometryIndices = featureTableIndex
					.query();
			results = new FeatureIndexGeoPackageResults(featureTableIndex,
					count, geometryIndices);
			break;
		case RTREE:
			UserCustomResultSet resultSet = rTreeIndexTableDao.queryForAll();
			results = new FeatureIndexRTreeResults(rTreeIndexTableDao,
					resultSet);
			break;
		default:
			FeatureResultSet featureResultSet = featureDao.queryForAll();
			results = new FeatureIndexFeatureResults(featureResultSet);
		}
		return results;
	}
468379
protected static void addFeature(String feature, FeatureMap featureMap, List<Integer> featureList)
    {
        int featureId = featureMap.idOf(feature);
        if (featureId != -1)
            featureList.add(featureId);
    }
174676
public List<FeatureTileLink> queryForTileTable(String tileTable) {

		List<FeatureTileLink> links = null;

		if (featureTileLinksActive()) {
			links = featureTileLinkDao.queryForTileTableName(tileTable);
		} else {
			links = new ArrayList<FeatureTileLink>();
		}

		return links;
	}
1362220
public int deleteLinks(String table) {

		int deleted = 0;

		try {
			if (featureTileLinkDao.isTableExists()) {
				deleted = featureTileLinkDao.deleteByTableName(table);
			}
		} catch (SQLException e) {
			throw new GeoPackageException(
					"Failed to delete feature tile links for GeoPackage: "
							+ geoPackage.getName() + ", Table: " + table, e);
		}

		return deleted;
	}
1269310
public void createTableStyleRelationship(String featureTable) {
		createStyleRelationship(
				getMappingTableName(TABLE_MAPPING_TABLE_STYLE, featureTable),
				featureTable, ContentsId.TABLE_NAME, StyleTable.TABLE_NAME);
	}
808919
public void link(String featureTable, String tileTable) {

		if (!isLinked(featureTable, tileTable)) {
			getOrCreateExtension();

			try {
				if (!featureTileLinkDao.isTableExists()) {
					geoPackage.createFeatureTileLinkTable();
				}

				FeatureTileLink link = new FeatureTileLink();
				link.setFeatureTableName(featureTable);
				link.setTileTableName(tileTable);

				featureTileLinkDao.create(link);
			} catch (SQLException e) {
				throw new GeoPackageException(
						"Failed to create feature tile link for GeoPackage: "
								+ geoPackage.getName() + ", Feature Table: "
								+ featureTable + ", Tile Table: " + tileTable,
						e);
			}
		}
	}
1225380
private static Shape getShapeWithId(String id,
                                        ArrayList<Shape> shapes) {
        Shape result = new Shape(id);
        if (shapes.contains(result)) {
            return shapes.get(shapes.indexOf(result));
        }

        shapes.add(result);
        return result;
    }
826908
public org.geomajas.layer.feature.FeatureTransaction toDto() {
		org.geomajas.layer.feature.FeatureTransaction dto = new org.geomajas.layer.feature.FeatureTransaction();
		dto.setLayerId(layer.getServerLayerId());
		if (oldFeatures != null) {
			org.geomajas.layer.feature.Feature[] oldDto = new org.geomajas.layer.feature.Feature[oldFeatures.length];
			for (int i = 0; i < oldFeatures.length; i++) {
				oldDto[i] = oldFeatures[i].toDto();
			}
			dto.setOldFeatures(oldDto);
		}
		if (newFeatures != null) {
			org.geomajas.layer.feature.Feature[] newDto = new org.geomajas.layer.feature.Feature[newFeatures.length];
			for (int i = 0; i < newFeatures.length; i++) {
				newDto[i] = newFeatures[i].toDto();
			}
			dto.setNewFeatures(newDto);
		}
		return dto;
	}
1030360
public Extensions getOrCreate(FeatureTable featureTable) {
		return getOrCreate(featureTable.getTableName(), featureTable
				.getGeometryColumn().getName());
	}
631707
public FeatureTileLink getLink(String featureTable, String tileTable) {
		FeatureTileLink link = null;

		if (featureTileLinksActive()) {
			FeatureTileLinkKey id = new FeatureTileLinkKey(featureTable,
					tileTable);
			try {
				link = featureTileLinkDao.queryForId(id);
			} catch (SQLException e) {
				throw new GeoPackageException(
						"Failed to get feature tile link for GeoPackage: "
								+ geoPackage.getName() + ", Feature Table: "
								+ featureTable + ", Tile Table: " + tileTable,
						e);
			}
		}

		return link;
	}
147631
public int[] columnMapping( String[] features ) {
    int[] map = new int[_colNames.length];
    for( int i=0; i<_colNames.length; i++ ) {
      map[i] = -1;              // Assume it is missing
      for( int j=0; j<features.length; j++ ) {
        if( _colNames[i].equals(features[j]) ) {
          if( map[i] != -1 ) throw new IllegalArgumentException("duplicate feature "+_colNames[i]);
          map[i] = j;
        }
      }
      if( map[i] == -1 ) Log.warn(Sys.SCORM,"Model feature "+_colNames[i]+" not in the provided feature list from the data");
    }
    return map;
  }
1034698
public void addMapShape(GoogleMapShape mapShape, long featureId, String database, String table) {
        FeatureShape featureShape = getFeatureShape(database, table, featureId);
        featureShape.addShape(mapShape);
    }
511736
public static TransactionGeomIndex getIndex(String identifier) {
		if (identifier == null) {
			return new TransactionGeomIndex();
		}
		TransactionGeomIndex index = new TransactionGeomIndex();
		int position = identifier.indexOf("featureTransaction.feature");
		if (position >= 0) {
			String temp = identifier.substring(position + ("featureTransaction.feature".length()));
			index.setFeatureIndex(readInteger(temp));

			// Geometry index (polygon, lineString or point):
			index.setGeometryIndex(getIndex(identifier, "polygon"));
			if (index.getGeometryIndex() < 0) {
				index.setGeometryIndex(getIndex(identifier, "linestring"));
			}
			if (index.getGeometryIndex() < 0) {
				index.setGeometryIndex(getIndex(identifier, "point"));
			}

			index.setExteriorRing(hasIdentifier(identifier, "shell"));
			index.setInteriorRingIndex(getIndex(identifier, "hole"));

			// Coordinate index (coordinate or edge):
			index.setCoordinateIndex(getIndex(identifier, "coordinate"));
			if (index.getCoordinateIndex() < 0) {
				index.setEdgeIndex(getIndex(identifier, "edge"));
			}
			return index;
		}
		return index;
	}
676023
private String getFeatureString(Set<String> featureNames) {
        StringBuilder featureBuilder = new StringBuilder();

        if (featureNames != null) {
            Iterator<String> iter = featureNames.iterator();
            while (iter.hasNext()) {
                featureBuilder.append(iter.next());
                if (iter.hasNext())
                    featureBuilder.append(',');
            }
        }
        return featureBuilder.toString();
    }
1034435
public void getFeature3D( int feature , Point4D_F64 out ) {
		out.x = X.get(0,feature);
		out.y = X.get(1,feature);
		out.z = X.get(2,feature);
		out.w = X.get(3,feature);
	}