Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Repository Guidelines

This file defines the repository-specific development rules and the operating boundaries for AI agents working on `longitude-one/spatial-writer`.
This file defines the repository-specific development rules and the operating boundaries for AI agents working on `longitude-one/spatial-encoder`.

## Project Structure & Module Organization

This PHP library converts spatial objects to WKB, EWKB, MySQL binary formats, and WKT text.
This PHP library encodes spatial objects to WKB, EWKB, MySQL binary formats, and WKT text.

Source lives in `lib/LongitudeOne/SpatialWriter/`, using Composer PSR-0 autoloading. `Writer` delegates conversion to `Strategy/StrategyInterface`; MySQL encoding helpers live in `Strategy/MySQL/`.
Source lives in `lib/LongitudeOne/SpatialEncoder/`, using Composer PSR-0 autoloading. `Encoder` delegates conversion to `Strategy/StrategyInterface`; MySQL encoding helpers live in `Strategy/MySQL/`.

Strategies preserve X/Y coordinate order. SRIDs do not trigger axis swapping.

Tests mirror the source under `tests/LongitudeOne/SpatialWriter/Tests/Unit/`.
Tests mirror the source under `tests/LongitudeOne/SpatialEncoder/Tests/Unit/`.

Quality tools have separate Composer installations and configuration under `quality/`. CI workflows live in `.github/workflows/`.

Expand Down Expand Up @@ -347,15 +347,15 @@ Breaking changes MUST follow Conventional Commits notation and MUST also satisfy
A breaking change MAY be indicated with `!`:

```text
feat!: change public writer API
feat!: change public encoder API
```

or with a `BREAKING CHANGE:` footer:

```text
feat: change public writer API
feat: change public encoder API

BREAKING CHANGE: Writer::write() now requires an explicit format.
BREAKING CHANGE: Encoder::encode() now requires an explicit format.
```

Both MAY be used together when appropriate.
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How to contribute to spatial-writer
# How to contribute to spatial-encoder

This library is open to contributions.
It comes with a set of quality tools to help you to maintain the quality of the code and pass the CI's tests.
Expand Down
22 changes: 10 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# Spatial Writer
# Spatial Encoder

The writer module provide an interface to convert any SpatialInterfaces to other formats.
The encoder module provides an interface for encoding any `SpatialInterface` into other formats.

This library provides five strategies to convert spatial interfaces to other formats:
* A strategy to convert any spatial interfaces to extended well known binary (EWKB).
* Another one to convert any spatial interfaces to ISO well known binary (WKB).
* A strategy to convert spatial interfaces to the internal MySQL storage format.
* A strategy to convert spatial interfaces to well-known text (WKT).
* A strategy to convert spatial interfaces to extended well-known text (EWKT), including a nonzero SRID.
This library provides five strategies for encoding spatial interfaces into other formats:

Feel free to provide any other strategy to convert spatial interfaces to other formats.
* A strategy for encoding any spatial interface into Extended Well-Known Binary (EWKB).
* A strategy for encoding any spatial interface into ISO Well-Known Binary (WKB).
* A strategy for encoding spatial interfaces into the internal MySQL storage format.
* A strategy for encoding spatial interfaces into Well-Known Text (WKT).
* A strategy for encoding spatial interfaces into Extended Well-Known Text (EWKT), including a non-zero SRID.

See the [strategy guide](docs/strategies.md) for a comparison of the five formats,
usage examples, implementation limits, and links to reference documentation.
Feel free to provide additional strategies for encoding spatial interfaces into other formats.

See the [strategy guide](docs/strategies.md) for a comparison of the five formats, usage examples, implementation limitations, and links to reference documentation.

## Current status
![longitude-one/spatial--writer](https://img.shields.io/badge/longitude--one-spatial--writer-blue)
Expand All @@ -31,4 +30,3 @@ usage examples, implementation limits, and links to reference documentation.
```bash
composer require longitude-one/spatial-writer:0.0.0
```

10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "longitude-one/spatial-writer",
"name": "longitude-one/spatial-encoder",
"type": "library",
"description": "This library convert any spatial interfaces to different binary and/or string format.",
"keywords": ["opengis", "postgis", "gis", "spatial", "geometry", "geography", "iso-13249", "ewkb", "php"],
"description": "This library encode any spatial interfaces into different binary or string format.",
"keywords": ["encode", "opengis", "postgis", "gis", "spatial", "geometry", "geography", "iso-13249", "ewkb", "wkt", "ewkt", "wkd", "php"],
"authors": [
{
"name": "Alexandre Tranchant",
Expand All @@ -27,8 +27,8 @@
"minimum-stability": "dev",
"autoload": {
"psr-0": {
"LongitudeOne\\SpatialWriter": "lib/",
"LongitudeOne\\SpatialWriter\\Tests": "tests/"
"LongitudeOne\\SpatialEncoder": "lib/",
"LongitudeOne\\SpatialEncoder\\Tests": "tests/"
}
},
"scripts": {
Expand Down
Loading
Loading