aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2019-08-20 13:22:01 +0200
committerGitHub <noreply@github.com>2019-08-20 13:22:01 +0200
commit2c9c015a6529548f5a5d448c78bc9b565d751590 (patch)
tree2597c59e8270f1480785c97f7441ee0b295c29b3 /docs
parente52fc2aa58504e6f0658da821bdd543d7a39df34 (diff)
parentcad1c5cf61fc00759bf4ad17b0b34f57f4945de6 (diff)
downloadPROJ-2c9c015a6529548f5a5d448c78bc9b565d751590.tar.gz
PROJ-2c9c015a6529548f5a5d448c78bc9b565d751590.zip
Merge pull request #1547 from rouault/json_export
Add CRS JSON export (refs #1545)
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile1
-rw-r--r--docs/source/apps/projinfo.rst63
2 files changed, 60 insertions, 4 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 4e1e88aa..c0801a9b 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -65,6 +65,7 @@ html: .doxygen_up_to_date
# Undoes the hacks of scripts/generate_breathe_friendly_general_doc.py
@sed "s/<em class=\"property\">namespace <\/em>//g" < $(BUILDDIR)/html/development/reference/cpp/cpp_general.html > $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp
@mv $(BUILDDIR)/html/development/reference/cpp/cpp_general.html.tmp $(BUILDDIR)/html/development/reference/cpp/cpp_general.html
+ @cp -r ../schemas $(BUILDDIR)/html/schemas
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
diff --git a/docs/source/apps/projinfo.rst b/docs/source/apps/projinfo.rst
index dabcc0fe..8018f300 100644
--- a/docs/source/apps/projinfo.rst
+++ b/docs/source/apps/projinfo.rst
@@ -44,6 +44,7 @@ Synopsis
(*added in 6.2*)
- a OGC URN combining references for concatenated operations
(e.g. "urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618")
+ - a PROJJSON string. The jsonschema is at https://proj.org/schemas/v0.1/projjson.schema.json (*added in 6.2*)
{object_reference} is a filename preceded by the '@' character. The
file referenced by the {object_reference} must contain a valid
@@ -54,7 +55,8 @@ Description
:program:`projinfo` is a program that can query information on a geodetic object,
coordinate reference system (CRS) or coordinate operation, when the ``-s`` and ``-t``
-options are specified, and display it under different formats (PROJ string, WKT string).
+options are specified, and display it under different formats (PROJ string, WKT string
+or PROJJSON string).
It can also be used to query coordinate operations available between two CRS.
@@ -69,7 +71,7 @@ The following control parameters can appear in any order:
.. option:: -o formats
formats is a comma separated combination of:
- ``all``, ``default``, ``PROJ``, ``WKT_ALL``, ``WKT2_2015``, ``WKT2_2018``, ``WKT1_GDAL``, ``WKT1_ESRI``.
+ ``all``, ``default``, ``PROJ``, ``WKT_ALL``, ``WKT2_2015``, ``WKT2_2018``, ``WKT1_GDAL``, ``WKT1_ESRI``, ``PROJJSON``.
Except ``all`` and ``default``, other formats can be preceded by ``-`` to disable them.
@@ -90,7 +92,7 @@ The following control parameters can appear in any order:
.. option:: -q
Turn on quiet mode. Quiet mode is only available for queries on single objects,
- and only one output format is selected. In that mode, only the PROJ or WKT
+ and only one output format is selected. In that mode, only the PROJ, WKT or PROJJSON
string is displayed, without other introduction output. The output is then
potentially compatible of being piped in other utilities.
@@ -223,7 +225,7 @@ The following control parameters can appear in any order:
.. option:: --single-line
- Output WKT strings on a single line, instead of multiple intended lines by
+ Output WKT or PROJJSON strings on a single line, instead of multiple intended lines by
default.
Examples
@@ -320,6 +322,59 @@ Output:
BBOX[23.81,-129.17,49.38,-65.69]],
ID["DERIVED_FROM(EPSG)",1241]]
+3. Export an object as a PROJJSON string
+
+.. code-block:: console
+
+ projinfo GDA94 -o PROJJSON -q
+
+Output:
+
+.. code-block:: json
+
+ {
+ "type": "GeographicCRS",
+ "name": "GDA94",
+ "datum": {
+ "type": "GeodeticReferenceFrame",
+ "name": "Geocentric Datum of Australia 1994",
+ "ellipsoid": {
+ "name": "GRS 1980",
+ "semi_major_axis": 6378137,
+ "inverse_flattening": 298.257222101
+ }
+ },
+ "coordinate_system": {
+ "subtype": "ellipsoidal",
+ "axis": [
+ {
+ "name": "Geodetic latitude",
+ "abbreviation": "Lat",
+ "direction": "north",
+ "unit": "degree"
+ },
+ {
+ "name": "Geodetic longitude",
+ "abbreviation": "Lon",
+ "direction": "east",
+ "unit": "degree"
+ }
+ ]
+ },
+ "area": "Australia - GDA",
+ "bbox": {
+ "south_latitude": -60.56,
+ "west_longitude": 93.41,
+ "north_latitude": -8.47,
+ "east_longitude": 173.35
+ },
+ "id": {
+ "authority": "EPSG",
+ "code": 4283
+ }
+ }
+
+
.. only:: man
See also