Geodesk

Fast and storage-efficient spatial database engine for OpenStreetMap data
Alternatives To Geodesk
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Imposm3619
a year ago17October 11, 202164apache-2.0Go
Imposm imports OpenStreetMap data into PostGIS
Osm Tasking Manager2428
5 years ago306otherJavaScript
Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
Docker Osm234
a year ago18gpl-2.0C
A docker compose project to setup an OSM PostGIS database with automatic updates from OSM periodically
Osmexpress176
8 months ago3July 13, 202011bsd-2-clauseC++
Fast database file format for OpenStreetMap
Healthsites134
a month ago192otherJavaScript
Building an open data commons of health facility data with OpenStreetMap
Openpoiservice122
2 years ago1August 07, 201823apache-2.0Python
:round_pushpin: Openpoiservice is a flask application which hosts a highly customizable points of interest database derived from OpenStreetMap data.
Geodesk117
a month ago7March 24, 202361apache-2.0Java
Fast and storage-efficient spatial database engine for OpenStreetMap data
Imposm2114
7 years ago21apache-2.0Python
Imports OpenStreetMap data into geo databases
Linkedgeodata114
a year ago16gpl-3.0Java
OpenStreetMap for the Semantic Web
Osmcoastline100
4 months ago3gpl-3.0C++
Extracts coastline data from OpenStreetMap planet file.
Alternatives To Geodesk
Select To Compare


Alternative Project Comparisons
Readme

GeoDesk is a fast and storage-efficient geospatial database for OpenStreetMap data.

Why GeoDesk?

  • Small storage footprint — GeoDesk's GOL files are only 20% to 50% larger than the original OSM data in PBF format — that's less than a tenth of the storage consumed by a traditional SQL-based database.

  • Fast queries — typically 50 times faster than SQL.

  • Fast to get started — Converting .osm.pbf data to a GOL is 20 times faster than an import into an SQL database. Alternatively, download pre-made data tiles for just the regions you need and automatically assemble them into a GOL.

  • Intuitive API — No need for object-relational mapping; GeoDesk queries return Node, Way and Relation objects. Quickly discover tags, way-nodes and relation members. Get a feature's Geometry, measure its length/area.

  • Proper handling of relations — (Traditional geospatial databases deal with geometric shapes and require workarounds to support this unique and powerful aspect of OSM data.)

  • Seamless integration with the Java Topology Suite (JTS) for advanced geometric operations, such as buffer, union, simplify, convex and concave hulls, Voronoi diagrams, and much more.

  • Modest hardware requirements — If it can run a 64-bit JVM, it'll run GeoDesk.

Get Started

Maven

Include this dependency in your project's pom.xml:

<dependency>
    <groupId>com.geodesk</groupId>
    <artifactId>geodesk</artifactId>
    <version>0.1.8</version>
</dependency>

Alternatively, to build the latest version from source:

git clone https://github.com/clarisma/geodesk.git
cd geodesk
mvn install

If you get weird exceptions during mvn install, you should upgrade Maven to version 3.8.5 or above.

Example Application

import com.geodesk.feature.*;
import com.geodesk.util.*;

public class PubsExample
{
    public static void main(String[] args)
    {
        FeatureLibrary library = new FeatureLibrary(     // 1    
            "example.gol",                               // 2
            "https://data.geodesk.com/switzerland");     // 3
        
        for(Feature pub: library                         // 4
            .select("na[amenity=pub]")                   // 5
            .in(Box.ofWSEN(8.53,47.36,8.55,47.38)))      // 6
        {
            System.out.println(pub.stringValue("name")); // 7
        }
        
        library.close();                                 // 8
    }
}

What's going on here?

  1. We're opening a feature library ...

  2. ... with the file name example.gol (If it doesn't exist, a blank one is created)

  3. ... and a URL from which data tiles will be downloaded.

  4. We iterate through all the features ...

  5. ... that are pubs (GeoDesk query languagesimilar to MapCSS)

  6. ... in downtown Zurich (bounding box with West/South/East/North coordinates).

  7. We print the name of each pub.

  8. We close the library.

That's it, you've created your first GeoDesk application!

More Examples

Find all movie theaters within 500 meters from a given point:

Features<?> movieTheaters = library
    .select("na[amenity=cinema]")
    .select(Filters.maxMetersFromLonLat(500, myLon, myLat));

Remember, OSM uses British English for its terminology.

Discover the bus routes that traverse a given street:

for(Relation route: street.parentRelations("[route=bus]"))
{
    System.out.format("- %s from %s to %s",
        route.stringValue("ref"),
        route.stringValue("from"),
        route.stringValue("To"));
}

Count the number of entrances of a building:

int numberOfEntrances = building.nodes("[entrance]").size();

Related Repositories

Popular Openstreetmap Projects
Popular Database Projects
Popular User Interface Components Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Database
Openstreetmap
Geospatial