All Projects → ngageoint → Geopackage Android

ngageoint / Geopackage Android

Licence: mit
GeoPackage Android Library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Geopackage Android

Composer
Reactive Android Instrumentation Test Runner. Archived. Marathon is recommended as an alternative (https://github.com/Malinskiy/marathon).
Stars: ✭ 558 (+675%)
Mutual labels:  android-sdk
Awesome Android Ui
😎😍Android libs and UI from GitHub or other websites. android libs from Github
Stars: ✭ 33 (-54.17%)
Mutual labels:  android-sdk
Teliver Android
Realtime Live Tracking of Location made Easy.
Stars: ✭ 49 (-31.94%)
Mutual labels:  android-sdk
Motiontoast
🌈 A Beautiful Motion Toast Library for Kotlin Android
Stars: ✭ 767 (+965.28%)
Mutual labels:  android-sdk
Commander
Set of reactive functions for cli tools like Swarmer and Composer.
Stars: ✭ 19 (-73.61%)
Mutual labels:  android-sdk
Androidkex
Extensions for Kotlin. Use the power of Kotlin to make your code smaller and beautiful.
Stars: ✭ 35 (-51.39%)
Mutual labels:  android-sdk
Payandroid
Android端对微信App支付和支付宝App支付的SDK进行二次封装,对外提供一个较为简单的接口和支付结果回调
Stars: ✭ 508 (+605.56%)
Mutual labels:  android-sdk
Kotlin Android Scaffolding
An android project structure using kotlin and most common libraries.
Stars: ✭ 53 (-26.39%)
Mutual labels:  android-sdk
Awesome Android
😎 A curated list of awesome Android resources
Stars: ✭ 26 (-63.89%)
Mutual labels:  android-sdk
Permissionsflow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 49 (-31.94%)
Mutual labels:  android-sdk
Androidsdk
🐳 Full-fledged Android SDK Docker Image
Stars: ✭ 776 (+977.78%)
Mutual labels:  android-sdk
Android Sdk
Beaconstac ADVANCED SDK for Android devices
Stars: ✭ 18 (-75%)
Mutual labels:  android-sdk
Docker Jenkins Android
Jenkins docker image for Android development
Stars: ✭ 35 (-51.39%)
Mutual labels:  android-sdk
Countly Sdk Android
Countly Product Analytics Android SDK
Stars: ✭ 626 (+769.44%)
Mutual labels:  android-sdk
Lichobile
lichess.org mobile application
Stars: ✭ 1,043 (+1348.61%)
Mutual labels:  android-sdk
Android Arsenal.com
Source to android-arsenal.herokuapp.com
Stars: ✭ 541 (+651.39%)
Mutual labels:  android-sdk
Ansible Role Android Sdk
Install Android SDK tools and packages, headless, with ansible.
Stars: ✭ 34 (-52.78%)
Mutual labels:  android-sdk
Android Dev Challenge
Google Android Dev Challenge 2017
Stars: ✭ 57 (-20.83%)
Mutual labels:  android-sdk
Grocerystore With Server
Grocery Store with server integration
Stars: ✭ 51 (-29.17%)
Mutual labels:  android-sdk
Andtroj
A tool for integrating the Metasploit payload with Android's healthy programs and bypassing antivirus
Stars: ✭ 43 (-40.28%)
Mutual labels:  android-sdk

GeoPackage Android

GeoPackage Android Lib

The GeoPackage Libraries were developed at the National Geospatial-Intelligence Agency (NGA) in collaboration with BIT Systems. The government has "unlimited rights" and is releasing this software to increase the impact of government investments by providing developers with the opportunity to take things in new directions. The software use, modification, and distribution rights are stipulated within the MIT license.

Pull Requests

If you'd like to contribute to this project, please make a pull request. We'll review the pull request and discuss the changes. All pull request contributions to this project will be released under the MIT license.

Software source code previously released under an open source license and then modified by NGA staff is considered a "joint work" (see 17 USC § 101); it is partially copyrighted, partially public domain, and as a whole is protected by the copyrights of the non-government authors and must be released according to the terms of the original open source license.

About

GeoPackage Android is a GeoPackage Library SDK implementation of the Open Geospatial Consortium GeoPackage spec. It is listed as an OGC GeoPackage Implementation by the National Geospatial-Intelligence Agency.

The GeoPackage SDK provides the ability to manage GeoPackage files providing read, write, import, export, share, and open support. Open GeoPackage files provide read and write access to features and tiles. Feature support includes Well-Known Binary translations. Tile generation supports creation by URL or features.

Usage

View the latest Javadoc

Implementations

GeoPackage Android Map

The GeoPackage Android Map SDK adds Android Map implementations to this base library.

GeoPackage MapCache

The GeoPackage MapCache app provides an extensive standalone example on how to use both this and the GeoPackage Android Map SDKs.

MAGE

The Mobile Awareness GEOINT Environment (MAGE) app provides mobile situational awareness capabilities. It uses the SDK to provide GeoPackage functionality.

DICE

The Disconnected Interactive Content Explorer (DICE) app allows users to load and display interactive content without a network connection. It uses the SDK to provide GeoPackage functionality on the map and within reports.

Example

// Context context = ...;
// File geoPackageFile = ...;

// Get a manager
GeoPackageManager manager = GeoPackageFactory.getManager(context);

// Import database
boolean imported = manager.importGeoPackage(geoPackageFile);

// Available databases
List<String> databases = manager.databases();

// Open database
GeoPackage geoPackage = manager.open(databases.get(0));

// GeoPackage Table DAOs
SpatialReferenceSystemDao srsDao = geoPackage.getSpatialReferenceSystemDao();
ContentsDao contentsDao = geoPackage.getContentsDao();
GeometryColumnsDao geomColumnsDao = geoPackage.getGeometryColumnsDao();
TileMatrixSetDao tileMatrixSetDao = geoPackage.getTileMatrixSetDao();
TileMatrixDao tileMatrixDao = geoPackage.getTileMatrixDao();
SchemaExtension schemaExtension = new SchemaExtension(geoPackage);
DataColumnsDao dao = schemaExtension.getDataColumnsDao();
DataColumnConstraintsDao dataColumnConstraintsDao = schemaExtension
        .getDataColumnConstraintsDao();
MetadataExtension metadataExtension = new MetadataExtension(geoPackage);
MetadataDao metadataDao = metadataExtension.getMetadataDao();
MetadataReferenceDao metadataReferenceDao = metadataExtension
        .getMetadataReferenceDao();
ExtensionsDao extensionsDao = geoPackage.getExtensionsDao();

// Feature and tile tables
List<String> features = geoPackage.getFeatureTables();
List<String> tiles = geoPackage.getTileTables();

// Query Features
String featureTable = features.get(0);
FeatureDao featureDao = geoPackage.getFeatureDao(featureTable);
FeatureCursor featureCursor = featureDao.queryForAll();
try {
    while (featureCursor.moveToNext()) {
        FeatureRow featureRow = featureCursor.getRow();
        GeoPackageGeometryData geometryData = featureRow.getGeometry();
        if (geometryData != null && !geometryData.isEmpty()) {
          Geometry geometry = geometryData.getGeometry();
          // ...
        }
    }
} finally {
    featureCursor.close();
}

// Query Tiles
String tileTable = tiles.get(0);
TileDao tileDao = geoPackage.getTileDao(tileTable);
TileCursor tileCursor = tileDao.queryForAll();
try {
    while (tileCursor.moveToNext()) {
        TileRow tileRow = tileCursor.getRow();
        byte[] tileBytes = tileRow.getTileData();
        Bitmap tileBitmap = tileRow.getTileDataBitmap();
        // ...
    }
} finally {
    tileCursor.close();
}

// Index Features
FeatureIndexManager indexer = new FeatureIndexManager(context, geoPackage, featureDao);
indexer.setIndexLocation(FeatureIndexType.GEOPACKAGE);
int indexedCount = indexer.index();

// Draw tiles from features
FeatureTiles featureTiles = new DefaultFeatureTiles(context, featureDao, context.getResources().getDisplayMetrics().density);
featureTiles.setMaxFeaturesPerTile(1000); // Set max features to draw per tile
NumberFeaturesTile numberFeaturesTile = new NumberFeaturesTile(context); // Custom feature tile implementation
featureTiles.setMaxFeaturesTileDraw(numberFeaturesTile); // Draw feature count tiles when max features passed
featureTiles.setIndexManager(indexer); // Set index manager to query feature indices
Bitmap tile = featureTiles.drawTile(2, 2, 2);

BoundingBox boundingBox = new BoundingBox();
Projection projection = ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM);

// URL Tile Generator (generate tiles from a URL)
TileGenerator urlTileGenerator = new UrlTileGenerator(context, geoPackage,
        "url_tile_table", "http://url/{z}/{x}/{y}.png", 1, 2, boundingBox, projection);
int urlTileCount = urlTileGenerator.generateTiles();

// Feature Tile Generator (generate tiles from features)
TileGenerator featureTileGenerator = new FeatureTileGenerator(context, geoPackage,
        featureTable + "_tiles", featureTiles, 1, 2, boundingBox, projection);
int featureTileCount = featureTileGenerator.generateTiles();

// Close feature tiles (and indexer)
featureTiles.close();

// Close database when done
geoPackage.close();

Installation

Pull from the Maven Central Repository (AAR, POM, Source, Javadoc)

compile "mil.nga.geopackage:geopackage-android:5.0.0"

Build

Build Artifacts Test

Build this repository using Android Studio and/or Gradle.

Project Setup

Include as repositories in your project build.gradle:

repositories {
    jcenter()
    mavenLocal()
}
Normal Build

Include the dependency in your module build.gradle with desired version number:

compile "mil.nga.geopackage:geopackage-android:5.0.0"

As part of the build process, run the "uploadArchives" task on the geopackage-android Gradle script to update the Maven local repository.

Local Build

Replace the normal build dependency in your module build.gradle with:

compile project(':geopackage-sdk')

Include in your settings.gradle:

include ':geopackage-sdk'

From your project directory, link the cloned SDK directory:

ln -s ../geopackage-android/geopackage-sdk geopackage-sdk

Remote Dependencies

  • GeoPackage Core Java (The MIT License (MIT)) - GeoPackage Library
  • TIFF (The MIT License (MIT)) - Tagged Image File Format Lib
  • OrmLite (Open Source License) - Object Relational Mapping (ORM) Library
  • PNGJ (Apache License, Version 2.0) - PNGJ: Java library for PNG encoding
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].