Skip to content

Commit

Permalink
Updated readme (#199)
Browse files Browse the repository at this point in the history
The readme was updated to reflect recent changes. It is now using the Coordinates API, which is the recommended way of using the epsg.io service.
  • Loading branch information
xkomczax authored Oct 9, 2024
1 parent 4b18240 commit e0008ce
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 114 deletions.
135 changes: 21 additions & 114 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,126 +1,33 @@
# EPSG.io
This service allows you to discover and transform coordinate systems from all over the world. Created and maintained by the [MapTiler team](https://www.maptiler.com/).
# EPSG.io

## Installation
![EPSG logo](./static/img/epsg-logo-small.png)

```
$ virtualenv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
```
Copy the content of "index" directory from the .zip from the latest project release.
[EPSG.io](https://epsg.io/) is a tool for discovering and accessing global coordinate systems, finding their parameters, and selecting relevant transformations. Created and maintained by the [MapTiler team](https://www.maptiler.com/), it serves as a _custom_ interface to the [EPSG database](https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset).

Start the server with:
The service offers a list of projections, coordinate systems, bounding boxes, and transformation options for improved precision in coordinate transformations.

```
$ export FLASK_APP=app.py
$ export FLASK_ENV=development
$ flask run
```
For detailed documentation, visit [epsg.io/docs](https://epsg.io/docs).

or use the gunicorn startup scripts (`./epsgio start`)
## Discovering coordinate systems, ellipsoids, transformations, units
Coordinate systems, ellipsoids, transformations, and units can be discovered directly via the search field at [EPSG.io](https://epsg.io/). The interface supports searching by EPSG codes (e.g., `3857`) or by part of the system's name (e.g., `pseudo-mercator`). Try [epsg.io/2056](https://epsg.io/2056) as an example.

## Export formats for all software
[EPSG.io](https://epsg.io/) offers coordinate reference system definitions in formats compatible with a wide range of geospatial software, including PROJ, GeoServer, Proj4.js, PostGIS, ESRI ArcGIS, and OGC WKT. For example, see [epsg.io/2056-1676.wkt2](https://epsg.io/2056-1676.wkt2).

## Create your own index from EPSG export
## EPSG.io endpoints
Using [EPSG.io](https://epsg.io/) endpoints allows users to discover coordinate systems, ellipsoids, units, and other objects, and retrieve specific coordinate definitions in various formats. For more details, visit [epsg.io/docs](https://epsg.io/docs).

Note: This is not required, as you can easily download the ready-to-use index from releases.
## Coordinates API

1. Download the newest EPSG database from [http://epsg-registry.org]
* a. After `login` it will able to `export registry` as `Export GML 3.2.1 with EPSG metadata`
2. Make sure that these files(folder) are in one folder
* a. folder `extra_codes_proj4_4.8.0.2`
* b. file `CRS_exceptions.csv`
* c. file `CRS_exceptions.py`
* d. file `gml_parser.py`
* e. file `GmlDictionary.xml` (downloaded EPSG database from http://epsg-registry.org)
3. Start indexing via `python gml_parser.py`
4. Move created `gml.sqlite` into `gml` folder
![MapTiler logo](./static/img/maptiler-logo-small.png)

## Types of URLs:
* [http://epsg.io/] > main page
* [http://epsg.io/1623] > transformation or crs
* [http://epsg.io/5514-1623] > crs with transformation
* [http://epsg.io/5514-1623.wkt] > page with wkt of crs 5514 with transformation 1623
* [http://epsg.io/5514-1623/map] > page with map of crs 5514 with transformation 1623
* [http://epsg.io/8901-primem] > other type then transformation or crs (prime meridia, datum,...)
* [http://epsg.io/ogp-op-1623] > gml:id from OGC XML
* [http://epsg.io/urn:ogc:def:coordinateOperation:EPSG::1623] > gml:identifier from OGC XML
[EPSG.io](https://epsg.io/) is a custom, open service provided by [MapTiler](https://www.maptiler.com/), free of charge. The **Coordinate transformation and search service** is powered by the [MapTiler Cloud Coordinates API](https://docs.maptiler.com/cloud/api/coordinates/). In addition to being compatible with [EPSG.io](https://epsg.io/), it introduces the [/transform](https://docs.maptiler.com/cloud/api/coordinates/#transform-coordinates) endpoint for coordinate transformations and [/search](https://docs.maptiler.com/cloud/api/coordinates/#search-coordinate-systems) API endpoint for searching through coordinate systems and its components.

CRS and Transformations are just codes (5514, 1623, 4326, 27700)
Other are codes with suffix like:
* for datums e.g. `9315-datum`
* for prime meridian e.g. `8901-primem`
* for ellipsoid e.g. `7004-ellipsoid`
* for method e.g. `9840-method`
* for coordinate system e.g. `6422-cs`
* for axis e.g. `106-axis`
* for area e.g. `1262-area`
* for units e.g. `9001-units`

## API for results

For result page exist a export in JSON and JSONP
for example

[http://epsg.io/?q=czech&format=json&trans=1&callback=jsonpFunction]

where:
* `format=json` for export in json **(obligatory)**
* `trans=1` for more detailed transformation in each coordinate reference system (optional)
* `callback=jsonpFunction` for jsonp where "jsonpFunction" is name of Javascript function (optional)

## API for /trans

### For one point
[http://epsg.io/trans?x=50&y=17&z=0&s_srs=4326&t_srs=5514&callback=jsonpFunction]

where everything is optional:
* `x`, `y`, `z` are coordinates of point, which going to be transformed (default is 0,0,0)
* `s_srs` represent source coordinate reference system (default is EPSG:4326)
* `t_srs` represent target coordinate reference system (default is EPSG:4326)
* `callback=jsonpFunction` is for jsonp where "jsonpFunction" is name of JavaScript function

e.g. [http://epsg.io/trans] will transform point on coordinates 0,0,0 from EPSG:4326 to EPSG:4326

### For many points
[http://epsg.io/trans?data=17,50;17,50,300;17.132,50.456&s_srs=4326&&t_srs=5514]

Where
* data=x,y;x,y,z;x.x,y.y (for example)
* Delimiter between points is `;`
* Delimiter between x,y,z is `,`
* Delimiter between decimal is `.`

## Types of queries

* `kind:`

value | meaning | value | meaning
--- | --- | --- | ---
CRS(default) | All coordinate reference systems | ELLIPSOID | Ellipsoid
PROJCRS | Projected coordinate systems | PRIMEM | Prime meridian
GEOGCRS|Geodetic coordinate systems|METHOD|Method
GEOG3DCRS|Geodetic 3D coordinate systems|CS|Coordinate systems
GCENCRS|Geocentric coordinate systems|VERTCS|Vertical coordinate system
VERTCRS|Vertical coordinate systems|SPHERCS|Spherical coordinate system
ENGCRS|Engineering coordinate systems|CARTESCS|Cartesian coordinate system
COMPOUNDCRS|Compound coordinate systems|ELLIPCS|Ellipsoidal coordinate system
COORDOP|All operations|AXIS|Axis
COPTRANS|Transformations|AREA|Area
COPCONOP|Compound operations|UNIT|Unit
COPCON|Conversions|ANGUNIT|Angle unit
DATUM|All datums|SCALEUNIT|Scale unit
VERTDAT|Vertical datums|LENUNIT|Length unit
ENGDAT|Engineering datums|TIMEUNIT|Time unit
GEODDAT|Geodetic datums||


* `deprecated:` 0(default), 1
* `code:` number of EPSG (5514, 4326,...)
* `name:` string of name (wgs 84, jtsk, s-jtks)
* `area:` string area of use (czech republic, world)
* `area_trans:` string area of use of transformation
* `alt_title:` alternative title (wgs84,...)

combinations: 8901 kind:PRIMEM, 1623 kind:COORDOP, code:1625 kind:COORDOP deprecated:1,...
The **Coordinates API** from MapTiler offers:
* API for **coordinate transformations**
* API for **searching** and **discovering** coordinate reference systems
* **Stable, reliable service** for integration into applications
* Option to use a dedicated MapTiler API key, enabling cost management across **multiple apps**
* **Batch transformations** for up to 50 points

For detailed API documentation, visit [docs.maptiler.com/cloud/api/coordinates/](https://docs.maptiler.com/cloud/api/coordinates/).
Binary file added static/img/epsg-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/maptiler-logo-small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e0008ce

Please sign in to comment.