~ubuntu-branches/ubuntu/trusty/liblas/trusty-proposed

« back to all changes in this revision

Viewing changes to doc/development/wkt.txt

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2014-01-05 17:00:29 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140105170029-ddtp0j63x5jvck2u
Tags: 1.7.0+dfsg-2
Fixed missing linking of system boost component.
(closes: #733282)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.. _srs_wkt:
 
2
 
 
3
******************************************************************************
 
4
Georeferencing LAS files with LAS 1.4
 
5
******************************************************************************
 
6
 
 
7
 
 
8
:Author: Howard Butler
 
9
:Contact: hobu.inc at gmail dot com
 
10
:Date: 2/28/2011
 
11
 
 
12
Summary
 
13
------------------------------------------------------------------------------
 
14
 
 
15
This document proposes how to handle describing spatial reference systems 
 
16
in `ASPRS LAS`_ 1.4. LAS 1.4 prescribes that software developers add and 
 
17
prefer to use OGC WKT coordinate system description in the form of VLR 
 
18
records in LAS files.  Softwares can choose to continue to write GeoTIFF keys 
 
19
to support older applications, but they should prefer the OGC WKT if it is 
 
20
found in the file.
 
21
 
 
22
Rationale
 
23
------------------------------------------------------------------------------
 
24
 
 
25
LAS 1.3 and below have used `GeoTIFF`_ keys as described by the `GeoTIFF
 
26
specification`_, but use of the GeoTIFF keys within LAS has a number of
 
27
deficiencies:
 
28
 
 
29
* GeoTIFF is typically tied to the `EPSG database`_ and does not provide
 
30
  simple mechanisms for extended definitions.
 
31
* Only a few softwares provide support for working with GeoTIFF keys directly.
 
32
* The GeoTIFF specification has no organization backing its continued
 
33
  development.
 
34
* GeoTIFF does not offer a mechanism to represent transformations between
 
35
  datums, while OGC WKT offers the TOWGS84[] mechanism
 
36
* GeoTIFF does not offer the possibility of fitted coordinate systems.
 
37
 
 
38
WKT
 
39
------------------------------------------------------------------------------
 
40
 
 
41
The `OpenGIS Coordinate Transformation Service Implementation Specification`_
 
42
provides the "Well-known Text Representation of Spatial Reference Systems"
 
43
(WKT) language in section seven. WKT is much more expressive than GeoTIFF keys,
 
44
has an organization providing institutional heft and progress behind it, and a
 
45
number of open source and commercial softwares are available to support
 
46
parsing and interpreting WKT output.
 
47
 
 
48
There are a few dialects of WKT of which to be aware. The most common dialect
 
49
is the "ESRI WKT" dialect, which does not include TOWGS84 and authority nodes,
 
50
but there are others including "GDAL", "CSMap", "Oracle 9", "Oracle 10", and
 
51
"GeoTools." While the basic form of WKT in these different dialects (other
 
52
than ESRI) is the same, the names used for different items, such as
 
53
``PARAMETER``, can often be spelled differently. It should be assumed that all
 
54
WKT provided in LAS files should be of a dialect that is not the "ESRI WKT"
 
55
dialect, which lacks some important features -- notably TOWGS84 and AUTHORITY
 
56
nodes. 
 
57
 
 
58
.. _`OpenGIS Coordinate Transformation Service Implementation Specification`: http://www.opengeospatial.org/standards/ct
 
59
.. _`MetaCRS`: http://trac.osgeo.org/metacrs/
 
60
 
 
61
 
 
62
 
 
63
Implementation
 
64
------------------------------------------------------------------------------
 
65
 
 
66
WKT can be specified in two optional Variable Length Record (VLR) entries with the 
 
67
``LASF_Projection`` User ID. The `Math Transform WKT`_ can be used to apply 
 
68
transformations to the `Coordinate System WKT`_.
 
69
 
 
70
Math Transform WKT
 
71
..............................................................................
 
72
 
 
73
Math Transform WKT (section 7.1 of the `OGC Coordinate Transform Specification`_) 
 
74
can also be specified to apply to a ``FITTED_CS``-style coordinate system.  
 
75
 
 
76
OGC Math Transform WKT strings shall be provided in a VLR with the
 
77
following attributes:
 
78
 
 
79
* User ID: LASF_Projection
 
80
* Record ID: 2111
 
81
 
 
82
The following conditions should also apply:
 
83
 
 
84
* Because VLRs can only be 65536 bytes size, an OGC Math Transform WKT
 
85
  string in a VLR data block is functionally limited to 64K in size.
 
86
* The OGC Math Transform WKT VLR data shall be a null-terminated string.
 
87
* The OGC Math Transform WKT VLR data shall be considered UTF-8.
 
88
* The OGC Math Transform WKT VLR data shall be considered ``C``
 
89
  locale-based, and no localization of the numeric strings within the WKT
 
90
  should be performed.
 
91
 
 
92
.. note::
 
93
    Math Transform WKT's widespread use is not expected, but it is provided
 
94
    for completeness and flexibility.
 
95
 
 
96
 
 
97
Coordinate System WKT
 
98
..............................................................................
 
99
 
 
100
OGC Coordinate System WKT strings shall be provided in a VLR with the
 
101
following attributes:
 
102
 
 
103
* User ID: LASF_Projection
 
104
* Record ID: 2112
 
105
 
 
106
The following conditions should also apply:
 
107
 
 
108
* Because VLRs can only be 65536 bytes size, an OGC Coordinate System WKT
 
109
  string in a VLR data block is functionally limited to 64K in size.
 
110
* The OGC Coordinate System WKT VLR data shall be a null-terminated string.
 
111
* The OGC Coordinate System WKT VLR data shall be considered UTF-8.
 
112
* The OGC Coordinate System WKT VLR data shall be considered ``C``
 
113
  locale-based, and no localization of the numeric strings within the WKT
 
114
  should be performed.
 
115
 
 
116
.. note::
 
117
    Though not specifically mentioned in previous LAS specifications,
 
118
    coordinate system information (in GeoTIFF or WKT) applies to the final
 
119
    coordinate data that are produced by transforming the raw coordinates by
 
120
    the scale and offset specified in the header for the given dimension.
 
121
 
 
122
Transition
 
123
------------------------------------------------------------------------------
 
124
 
 
125
Older softwares may want to continue to use GeoTIFF keys, and it is not
 
126
desirable to have an abrupt discontinuity in the description of coordinate
 
127
systems for LAS data. Additionally, while many softwares may not need the
 
128
features of OGC WKT, its usage represents the strongest case for
 
129
interoperability with other software -- especially software in the GIS and CAD
 
130
domains that take advantage of the OGC WKT specification.
 
131
 
 
132
Softwares that currently write GeoTIFF VLR records into LAS files can continue
 
133
to do so in LAS 1.4. It is acceptable to write *only* GeoTIFF VLR records into
 
134
an LAS file, while softwares that choose to write OGC WKT VLRs must also
 
135
write GeoTIFF VLRs to promote backward compatibility. If a file is found to
 
136
have both OGC WKT and GeoTIFF VLRs, the OGC WKT description, which is more
 
137
expressive, should be preferred if possible.
 
138
 
 
139
Resources
 
140
------------------------------------------------------------------------------
 
141
 
 
142
The ASPRS LAS specification attempts to offload specification of coordinate
 
143
system description and transformation by standing on the shoulders of other
 
144
specifications in the ecosystem. To that end, there are options for both
 
145
software and support for an LAS developer to take advantage of. Those below
 
146
are provided for information purposes only, and are not expected to be
 
147
canonical. Use your favorite search engine for more details.
 
148
 
 
149
Software
 
150
..............................................................................
 
151
 
 
152
As mentioned previously, a number of open source and commercial softwares are
 
153
available to help an implementor of ASPRS LAS utilize Coordinate System and
 
154
Math Transform WKT in their software.
 
155
 
 
156
Some common open source softwares include:
 
157
 
 
158
* `GDAL`_'s `OSR`_
 
159
* `CS-Map`_
 
160
* `GeoTools`_/`Geotoolkit`_ 
 
161
 
 
162
Some commercial options include:
 
163
 
 
164
* `Blue Marble®`_ 
 
165
* `ArcGIS®`_
 
166
 
 
167
Questions
 
168
..............................................................................
 
169
 
 
170
If you have questions about how to produce WKT, please participate on
 
171
the `MetaCRS`_ mailing list. Examples of WKT may also be found on the
 
172
http://spatialreference.org website.
 
173
 
 
174
.. _`OSR`: http://www.gdal.org/ogr/osr_tutorial.html
 
175
.. _`ArcGIS®`: http://www.arcgis.com
 
176
 
 
177
.. _`Blue Marble®`: http://www.bluemarblegeo.com/
 
178
.. _`GDAL`: http://www.gdal.org
 
179
.. _`CS-Map`: http://trac.osgeo.org/csmap/
 
180
.. _`GeoTools`: http://www.geotools.org/
 
181
.. _`Geotoolkit`: http://www.geotoolkit.org/
 
182
 
 
183
.. _`OGC Coordinate Transform Specification`: http://www.opengeospatial.org/standards/ct
 
184
 
 
185
 
 
186
.. _`ASPRS LAS`: http://www.asprs.org/society/committees/standards/lidar_exchange_format.html
 
187
.. _`GeoTIFF specification`: ftp://ftp.remotesensing.org/pub/geotiff/spec/geotiff.rtf
 
188
.. _`GeoTIFF`: http://trac.osgeo.org/geotiff/
 
189
.. _`EPSG database`: http://www.epsg-registry.org/
 
190