Java Code Examples for mil.nga.geopackage.features.user.FeatureDao#getTableName()
The following examples show how to use
mil.nga.geopackage.features.user.FeatureDao#getTableName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FeaturePreview.java From geopackage-android with MIT License | 5 votes |
/** * Draw a preview image * * @return preview image */ public Bitmap draw() { Bitmap image = null; FeatureDao featureDao = featureTiles.getFeatureDao(); String table = featureDao.getTableName(); Projection webMercator = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WEB_MERCATOR); BoundingBox boundingBox = geoPackage.getFeatureBoundingBox(webMercator, table, false); if (boundingBox == null) { boundingBox = geoPackage.getContentsBoundingBox(webMercator, table); } if (boundingBox == null && manual) { boundingBox = geoPackage.getFeatureBoundingBox(webMercator, table, manual); } if (boundingBox != null) { boundingBox = TileBoundingBoxUtils .boundWebMercatorBoundingBox(boundingBox); BoundingBox expandedBoundingBox = boundingBox .squareExpand(bufferPercentage); expandedBoundingBox = TileBoundingBoxUtils .boundWebMercatorBoundingBox(expandedBoundingBox); int zoom = TileBoundingBoxUtils.getZoomLevel(expandedBoundingBox); FeatureCursor results = featureDao.query( columns.toArray(new String[]{}), where, whereArgs, null, null, null, limit != null ? limit.toString() : null); image = featureTiles.drawTile(zoom, expandedBoundingBox, results); } return image; }
Example 2
Source File: FeaturePreview.java From geopackage-java with MIT License | 5 votes |
/** * Draw a preview image * * @return preview image */ public BufferedImage draw() { BufferedImage image = null; FeatureDao featureDao = featureTiles.getFeatureDao(); String table = featureDao.getTableName(); Projection webMercator = ProjectionFactory .getProjection(ProjectionConstants.EPSG_WEB_MERCATOR); BoundingBox boundingBox = geoPackage.getFeatureBoundingBox(webMercator, table, false); if (boundingBox == null) { boundingBox = geoPackage.getContentsBoundingBox(webMercator, table); } if (boundingBox == null && manual) { boundingBox = geoPackage.getFeatureBoundingBox(webMercator, table, manual); } if (boundingBox != null) { boundingBox = TileBoundingBoxUtils .boundWebMercatorBoundingBox(boundingBox); BoundingBox expandedBoundingBox = boundingBox .squareExpand(bufferPercentage); expandedBoundingBox = TileBoundingBoxUtils .boundWebMercatorBoundingBox(expandedBoundingBox); int zoom = TileBoundingBoxUtils.getZoomLevel(expandedBoundingBox); FeatureResultSet results = featureDao.query( columns.toArray(new String[] {}), where, whereArgs, null, null, null, limit != null ? limit.toString() : null); image = featureTiles.drawTile(zoom, expandedBoundingBox, results); } return image; }
Example 3
Source File: FeatureInfoBuilder.java From geopackage-android-map with MIT License | 4 votes |
/** * Constructor * * @param context context * @param featureDao feature dao */ public FeatureInfoBuilder(Context context, FeatureDao featureDao) { this.featureDao = featureDao; geometryType = featureDao.getGeometryType(); name = featureDao.getDatabase() + " - " + featureDao.getTableName(); Resources resources = context.getResources(); maxPointDetailedInfo = resources.getInteger(R.integer.map_feature_max_point_detailed_info); maxFeatureDetailedInfo = resources.getInteger(R.integer.map_feature_max_feature_detailed_info); detailedInfoPrintPoints = resources.getBoolean(R.bool.map_feature_detailed_info_print_points); detailedInfoPrintFeatures = resources.getBoolean(R.bool.map_feature_detailed_info_print_features); }
Example 4
Source File: FeatureTableIndex.java From geopackage-android with MIT License | 2 votes |
/** * Constructor * * @param geoPackage GeoPackage * @param featureDao feature dao */ public FeatureTableIndex(GeoPackage geoPackage, FeatureDao featureDao) { super(geoPackage, featureDao.getTableName(), featureDao .getGeometryColumnName()); this.featureDao = featureDao; }
Example 5
Source File: FeatureTableIndex.java From geopackage-java with MIT License | 2 votes |
/** * Constructor * * @param geoPackage * GeoPackage * @param featureDao * feature dao */ public FeatureTableIndex(GeoPackage geoPackage, FeatureDao featureDao) { super(geoPackage, featureDao.getTableName(), featureDao.getGeometryColumnName()); this.featureDao = featureDao; }