GeomCompare

Compare two sets of geometrical features.

GeomCompare provides multiple tools for comparing two independant sets of geometrical features. It can be used to identify features with similar geometry (based on pre-defined similarity functions) found in both sets, as well features with geometry that are found in only one of the sets. GeomCompare defines a few similarity functions, but it possible for the user to define its own customized similarity functions.

Installation

Requirements

GeomCompare requires Python >= 3.9.

In addition, for a fully fledged installation of GeomCompare and to have access to all functionalities provided by the library, the user need to install the following:

  • shapely

  • numpy

  • psycopg2

  • rtree

  • pyproj

  • gdal (core libraries and Python bindings)

  • spatialite (SQLite extension library, not a python package)

    Note

    mod_spatialite must be installed and accessible from sqlite3:

    import sqlite3
    conn = sqlite3.connect(":memory:")
    conn.enable_load_extension(True)
    conn.load_extension("mod_spatialite")
    

All dependencies above are pip-installable, except for gdal and spatialite which are non-(pure-)python external libraries.

PIP

If you use pip, you can install GeomCompare with:

pip install geomcompare

Docker

A Docker image for GeomCompare is also available on DockerHub:

  • Run the geomcompare image and start an iPython session inside the container:

    docker run -it mtachon/geomcompare

  • Run the geomcompare image, and mount the current directory into the data folder of the container:

    docker run --entrypoint bash -v `pwd`:/data -w /data -it mtachon/geomcompare

For more information on Docker and command-line arguments, see: https://docs.docker.com/ and https://docs.docker.com/engine/reference/run/ .