#ogc #geo #crs #coordinates

epsg

EPSG Coordinate Reference System tools & data

8 releases (1 stable)

11.1.2 Dec 14, 2023
0.11.1 Dec 13, 2023
0.5.1 Sep 5, 2021
0.4.0 Nov 1, 2020
0.1.0 Jul 22, 2020

#3 in #ogc

Download history 9/week @ 2023-11-04 7/week @ 2023-11-11 14/week @ 2023-11-18 16/week @ 2023-11-25 28/week @ 2023-12-02 57/week @ 2023-12-09 20/week @ 2023-12-16 22/week @ 2023-12-23 14/week @ 2023-12-30 19/week @ 2024-01-06 5/week @ 2024-01-13 22/week @ 2024-01-20 24/week @ 2024-01-27 12/week @ 2024-02-03 40/week @ 2024-02-10 119/week @ 2024-02-17

196 downloads per month
Used in ogc

MIT license

4MB
102K SLoC

epsg

Master branch build License - MIT EPSG on docs.rs

EPSG reference data and common types for working with Coordinate Reference Systems.

The Rust structures in this library are generated from the EPSG Dataset version 10.033.

See the documentation for more information.

Building

This project requires a PostgreSQL instance to export data to generate code.

  1. Download the EPSG*PostgreSQL.zip dataset and place it in this dir
  2. Create a database dir & extract the archive there
  3. Run prepare.sh
  4. Run docker-compose up -d
  5. Run: PG_STR="host=localhost user=postgres password=postgres dbname=epsg" cargo build --release.

More detailed instructions are below.

Versioning

This project follows the semantic versioning convention and uses the corresponding ESPG dataset version as its major and minor versions, reserving maintenance for non-breaking library changes.

Generating the Structures

The data is generated by reading the local PostgreSQL database and exporting it to src/references.rs via build.rs.

The steps to do so are as follows (or run prepare.sh):

  1. Download the EPSG*PostgreSQL.zip dataset and place it in this dir
  2. Create a database dir & extract the archive there
  3. Rename each file as in database as follows:
  • PostgreSQL_Table_Script.sql to 01.sql
  • PostgreSQL_Data_Script.sql to 02.sql
  • PostgreSQL_FKey_Script.sql to 03.sql
  1. Start the postgres container:
  docker-compose up -d
  1. Run: PG_STR="host=localhost user=postgres password=postgres dbname=epsg" cargo build --release.

Contributions

Contributions are welcome. All submissions will be distributed under the MIT license if accepted.

Terms

See the terms of use for the EPSG Dataset.

Dependencies

~1–4.5MB
~84K SLoC