opengis-utils-for-java

Read, write, and manipulate GIS layers across spatial formats with Java.

49|9|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/znlgis/opengis-skills --skill opengis-utils-for-java
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: opengis-utils-for-java
Source: https://github.com/znlgis/opengis-skills/tree/main/opengis-utils-for-java
Command: npx skills add https://github.com/znlgis/opengis-skills --skill opengis-utils-for-java

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a unified Java library that removes friction when reading, writing, converting, and analyzing spatial data across multiple GIS formats and engines, so developers no longer need to stitch together GeoTools, GDAL, JTS, and ESRI tooling manually.

Core Features & Use Cases

  • Unified Layer Model: OguLayer abstracts features, fields, geometries (WKT), and metadata for consistent read/write workflows.
  • Dual-Engine I/O: Automatic selection between GeoTools (pure Java) and GDAL (native) for format support including Shapefile, GeoJSON, FileGDB, and PostGIS.
  • Rich Geometry APIs: GeometryUtil offers 60+ geometry operations (format conversions, spatial relations, buffer/union/intersection, topology validation) with both JTS Geometry and WKT-based methods.
  • CRS & Utilities: CrsUtil simplifies transformations, zone lookup, and projected WKID mapping; utilities handle encoding, shapefile quirks, and ZIP operations.
  • Use Case: Convert a FileGDB layer to GeoJSON, validate and fix invalid geometries, reproject to a target CRS, and export for downstream web mapping.

Quick Start

Use OguLayerUtil.readLayer to load your source layer, apply GeometryUtil operations and CrsUtil for reprojection, then export with OguLayerUtil.writeLayer to the desired format.

Frequently Asked Questions about opengis-utils-for-java

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert a FileGDB layer to GeoJSON in Java?

To convert a FileGDB layer to GeoJSON in Java, load the source layer with OguLayerUtil.readLayer, apply geometry operations, and export with OguLayerUtil.writeLayer. This requires Java 17+ and optional native GDAL bindings for FileGDB access.

What is the best way to handle spatial format conversion and reprojection across multiple GIS engines?

Handling spatial format conversion and reprojection across GIS engines is done using a unified OguLayer WKT-based model. It automatically selects between GeoTools and GDAL for I/O, while CrsUtil simplifies coordinate reference transformations and projected WKID mapping.

How do I validate and fix invalid geometries before exporting a Shapefile?

Validating and fixing invalid geometries before exporting a Shapefile uses GeometryUtil, which provides 60+ geometry operations including topology validation. Both JTS Geometry and WKT-based methods are available to ensure spatial data integrity before writing.

Does this Java GIS toolkit require native GDAL libraries for PostGIS access?

Native GDAL libraries are not required for PostGIS access, as the toolkit uses a dual-engine I/O system that can automatically select GeoTools for pure Java support. Native GDAL is only an optional dependency needed specifically for FileGDB access.

Why use a unified Java GIS library instead of stitching together GeoTools, JTS, and ESRI tooling manually?

Using a unified Java GIS library removes the friction of manually stitching together GeoTools, JTS, and ESRI tooling. It provides a consistent OguLayer model for features and geometries, streamlining reading, writing, and analyzing spatial data across common formats.

What Java version is required to build spatial data manipulation projects with this toolkit?

Java 17 or higher is required to build spatial data manipulation projects with this GIS toolkit. The project uses Maven for its build process and supports spatial analysis tasks using the ESRI Geometry API, JTS, and GeoTools frameworks.