{"id":26190115,"url":"https://github.com/zazuko/spatial-indexer","last_synced_at":"2025-04-15T02:09:42.048Z","repository":{"id":74818024,"uuid":"460025231","full_name":"zazuko/spatial-indexer","owner":"zazuko","description":"Generate a spatial index file from a TDB2 dataset","archived":false,"fork":false,"pushed_at":"2024-06-17T17:59:48.000Z","size":57,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-15T02:09:35.447Z","etag":null,"topics":["apache-jena","apache-jena-fuseki","cli-tool","geosparql","rdf","spatial-index"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zazuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-16T13:53:34.000Z","updated_at":"2025-03-26T14:18:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"25c46194-65b4-48a3-810c-5e0db2a34b60","html_url":"https://github.com/zazuko/spatial-indexer","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fspatial-indexer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fspatial-indexer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fspatial-indexer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zazuko%2Fspatial-indexer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zazuko","download_url":"https://codeload.github.com/zazuko/spatial-indexer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991544,"owners_count":21194894,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-jena","apache-jena-fuseki","cli-tool","geosparql","rdf","spatial-index"],"created_at":"2025-03-12T00:52:34.223Z","updated_at":"2025-04-15T02:09:42.032Z","avatar_url":"https://github.com/zazuko.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spatial Indexer\n\nThis project is using Apache Jena library to generate a spatial index file from a TDB2 dataset.\nGenerating the spatial index file before starting a Fuseki instance with GeoSPARQL support can save some precious time when starting the Fuseki instance.\n\nIf you want to play with Fuseki with GeoSPARQL support, you may be interested in: https://github.com/zazuko/fuseki-geosparql.\n\n## Build\n\nBuild the package using the following command:\n\n```sh\nmvn clean package\n```\n\n## Run the tool\n\nOnce you built the package, you can run the spatial indexer tool by using this command:\n\n```sh\njava -jar target/spatialindexer-*-jar-with-dependencies.jar \\\n  --dataset /tmp/test-ds \\\n  --index /tmp/test-spatial.index\n```\n\nYou can edit the paths with some specific values.\n\nSupported options:\n\n- `--dataset`, `-d`: path to the dataset (required)\n- `--index`, `-i`: path to the spatial index file to generate (required)\n- `--srs`, `-s`: manually set a SRS URI, by default, it will take the one that is the most present in the dataset or use CRS84 as a fallback\n\n## Docker image\n\nThe Docker image is configurable using the following environment variables:\n\n- `JAVA_OPTIONS`: add some Java options (default: _empty_)\n- `SRS_URI`: specify a SRS URI to use (default: _empty_)\n- `DATASET_PATH`: path to the dataset (default: `/databases/ds`)\n- `SPATIAL_INDEX_FILE_PATH`: path to the spatial index file to generate (default: `/databases/ds/spatial.index`)\n\nIf you want to run it quickly on a dataset on your machine, go in the dataset directory, then run the following:\n\n```sh\ndocker run --rm \\\n  -v$(pwd):/databases/ds \\\n  ghcr.io/zazuko/spatial-indexer:latest \\\n  --srs http://www.opengis.net/def/crs/OGC/1.3/CRS84\n```\n\nThis will generate a `spatial.index` file in your dataset directory.\n\nSince the container is running as `root`, you may need to change permissions for the generated spatial index file, by using something similar to:\n\n```sh\nsudo chown \"${USER}\" spatial.index\n```\n\nIf you want to create a Docker image that uses this tool, you can do something like this:\n\n```Dockerfile\nFROM ...\n\n# ...\n\n# make sure you have a Java runtime somewhere in the image\n\n# ...\nCOPY --from=ghcr.io/zazuko/spatial-indexer:latest /app/spatialindexer.jar .\n# ...\n\n```\n\nOr if you want to directly fetch the `jar` file locally, you can use this command:\n\n```sh\ndocker pull ghcr.io/zazuko/spatial-indexer:latest\nCONTAINER_ID=$(docker create ghcr.io/zazuko/spatial-indexer:latest)\ndocker cp \"${CONTAINER_ID}:/app/spatialindexer.jar\" .\ndocker stop \"${CONTAINER_ID}\"\ndocker rm \"${CONTAINER_ID}\"\n```\n\nMake sure to use a full semver tag of the image instead of `latest` to avoid any breaking change in your workflow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fspatial-indexer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzazuko%2Fspatial-indexer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzazuko%2Fspatial-indexer/lists"}