summaryrefslogtreecommitdiff
path: root/index.html.in
blob: 0d7869094b7c8add954684e61d2d5e544e098086 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!-- This file is the root of https://cdn.proj.org/ -->
<!-- Part of it is generated by the regenerate_index_html.py script -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<title>PROJ Datumgrid CDN</title>
<!--
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v6.1.1/build/ol.js"></script>
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v6.1.1/css/ol.css">
-->
<script src="ol.js"></script>
<link rel="stylesheet" href="ol.css">
<style>
    .map {
        width: 50%;
        height: 600px;
    }
    .ol-popup {
        position: absolute;
        background-color: white;
        -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
        filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
        padding: 15px;
        border-radius: 10px;
        border: 1px solid #cccccc;
        bottom: 12px;
        left: -50px;
        min-width: 280px;
    }
    .ol-popup:after, .ol-popup:before {
        top: 100%;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
        }
    .ol-popup:after {
        border-top-color: white;
        border-width: 10px;
        left: 48px;
        margin-left: -10px;
    }
    .ol-popup:before {
        border-top-color: #cccccc;
        border-width: 11px;
        left: 48px;
        margin-left: -11px;
    }
    .ol-popup-closer {
        text-decoration: none;
        position: absolute;
        top: 2px;
        right: 8px;
    }
    .ol-popup-closer:after {
        content: "✖";
    }
</style>
</head>

<body>

<h1>PROJ.org Datumgrid CDN</h1>
<p>
The s3://cdn.proj.org bucket is hosted by the
<a href="https://aws.amazon.com/opendata/public-datasets/">Amazon Public Datasets</a> program, and it
can be accessed via HTTP/S at <a href="https://cdn.proj.org">cdn.proj.org</a>. CDN services are
provided by the AWS Public Dataset team via <a href="https://aws.amazon.com/cloudfront/">CloudFront</a>.
</p>
<p>
The CDN contains <a href="https://www.cogeo.org/">Cloud Optimized GeoTIFF</a> datasets which are mirrored and
managed by the
<a href="https://github.com/OSGeo/proj-datumgrid-geotiff/">https://github.com/OSGeo/proj-datumgrid-geotiff/</a>
GitHub project.  Files in the CDN are designed to be used by <a href="https://proj.org">PROJ</a> 7 or later, but any software
project wishing to use the CDN for shifting support are encouraged to participate in the project and leverage the CDN.
</p>
<h2>Mirroring</h2>
<p>If you are able, you are encouraged to mirror the grids via AWS S3 command line: </p>
<pre>aws s3 sync s3://cdn.proj.org .</pre>

<p>If direct S3 access is not possible, you can also use <i>wget</i> to locally mirror
the data: </p>
<pre>wget --mirror https://cdn.proj.org/</pre>

<h2>Content</h2>
<div>
    <div id="map" class="map" style="float: left;"></div>
    <div id="details"></div>
    <div style="clear: both;"></div>
</div>
<div id="popup" class="ol-popup">
    <a href="#" id="popup-closer" class="ol-popup-closer"></a>
    <div id="popup-content"></div>
</div>
<script>
var vectorLayerJSON = new ol.layer.Vector({
  source: new ol.source.Vector({
    format: new ol.format.GeoJSON(),
    url: 'files.geojson'
    //url: "https://gist.githubusercontent.com/rouault/7c2f687e58b7e1e6a30c48f39d3d879e/raw/c68c647812ba23bf58e7986a158e65671326f4c3/files.geojson"
  }),
  style: new ol.style.Style({
    stroke : new ol.style.Stroke(
    {
        width : 1
    }),
    fill : new ol.style.Fill(
    {
        color :  'rgba(0, 0, 0, 0.01)'
    })
  })
});


/**
 * Elements that make up the popup.
 */
var container = document.getElementById('popup');
var content = document.getElementById('popup-content');
var closer = document.getElementById('popup-closer');
var details = document.getElementById('details');

/**
 * Create an overlay to anchor the popup to the map.
 */
var overlay = new ol.Overlay({
  element: container,
  autoPan: true,
  autoPanAnimation: {
    duration: 250
  }
});


/**
 * Add a click handler to hide the popup.
 * @return {boolean} Don't follow the href.
 */
closer.onclick = function() {
  overlay.setPosition(undefined);
  closer.blur();
  return false;
};


var map = new ol.Map({
  layers: [new ol.layer.Tile({source: new ol.source.OSM()}), vectorLayerJSON],
  renderer: 'canvas',
  target: 'map',
  overlays: [overlay],
  view: new ol.View({
    center: [0, 0],
    zoom: 0
  })
});


// Add an event handler for the map "singleclick" event
map.on('singleclick', function(evt) {
    var coordinate = evt.coordinate;

    //content_innerHTML = '';
    details_innerHTML = '';
    count = 0;
    map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
        var props = feature.getProperties();
        count ++;
        //content_innerHTML += '<p><a href="' + props.name + '">' + props.name + '</a></p>';
        details_innerHTML += '<p><a href="' + props.name + '">' + props.name + '</a>: '
        if( props.area_of_use ) {
            details_innerHTML += props.area_of_use + ', ';
        }
        details_innerHTML += props.source;
        details_innerHTML += ', ' + props.description;
        details_innerHTML += '</p>';
    });
    details.innerHTML = details_innerHTML;
/*
    if( count >= 5 ) {
        content_innerHTML = '';
    }
    content.innerHTML = content_innerHTML;
    if (content_innerHTML != '') {
        overlay.setPosition(coordinate);
    } else {
        overlay.setPosition(undefined);
    }
*/
});

</script>

<p>The bucket contains the following files:</p>
<ul>
<li><a href="README.DATUMGRID">README.DATUMGRID</a></li>
${LINKS_WILL_BE_ADDED_HERE_BY_REGENERATE_INDEX_HTML}
</ul>
<p>
Total size of content: ${TOTAL_SIZE}
</p>

<h2>Logs</h2>
<p>Access logs to this resource are permanently deleted after one day, are not
mirrored or stored, and are not publicly available. If this policy is not
sufficient, users are encourage to mirror a local copy of the grid files and
access them directly.
</p>

<div style="text-align: center;">
<a href="https://aws.amazon.com/what-is-cloud-computing">
<img src="https://d0.awsstatic.com/logos/powered-by-aws.png" style="position: relative; top: 50%; transform: translateY(50%);" alt="Powered by AWS Cloud Computing">
</a>&nbsp;for use by&nbsp;
<a href="https://proj.org">
<img src="https://proj.org/_static/logo.png" style="position: relative; top: 50%; transform: translateY(50%);" alt="PROJ"></a>
</div>
</body>
</html>