Mercurial > gemma
annotate pkg/wkb/wkb.go @ 5457:fb3e127bccb4 uiimprovements
fixed linting errors
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 15 Jul 2021 10:11:49 +0200 |
parents | 95786a675d70 |
children |
rev | line source |
---|---|
2471
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 // This is Free Software under GNU Affero General Public License v >= 3.0 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 // without warranty, see README.md and license for details. |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 // |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 // SPDX-License-Identifier: AGPL-3.0-or-later |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 // License-Filename: LICENSES/AGPL-3.0.txt |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 // |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 // Copyright (C) 2018 by via donau |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 // – Österreichische Wasserstraßen-Gesellschaft mbH |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 // Software engineering by Intevation GmbH |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 // |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 // Author(s): |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 package wkb |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 |
4185
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
16 // Binary encoding in WKB data. |
2471
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 const ( |
4185
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
18 XDR byte = 0 // big endian. |
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
19 NDR byte = 1 // little endian. |
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
20 ) |
2471
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 |
4185
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
22 // Various types of geometry. |
fc928ce7b57c
Made 'golint' happy with the wkb package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
2471
diff
changeset
|
23 const ( |
2471
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 Point uint32 = 1 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 LineString uint32 = 2 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 Polygon uint32 = 3 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 MultiLineString uint32 = 5 |
4296
95786a675d70
WIP: Started with downloading stretches as ESRI shapes.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
4185
diff
changeset
|
28 MultiPolygon uint32 = 6 |
2471
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 PointZ uint32 = 1000 + 1 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 LineStringZ uint32 = 1000 + 2 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 MultiPointZ uint32 = 1000 + 4 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 MultiLineStringZ uint32 = 1000 + 5 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 TinZ uint32 = 1000 + 16 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 TriangleZ uint32 = 1000 + 17 |
63475c8e710e
Moved WKB constants to own package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 ) |