Skip to content

Instantly share code, notes, and snippets.

@eliotjordan
eliotjordan / marc.go
Last active July 2, 2019 19:47
Process MARC XML with golang
package main
import (
"encoding/xml"
"fmt"
"strings"
"time"
"io/ioutil"
"os"
)
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@type": "sc:Manifest",
"@id": "http://localhost:3000/concern/scanned_maps/ccfba492-79e2-46ba-9390-a5e9a021cb3c/manifest",
"label": [
"Vega"
],
"description": "I believe consistency and orthogonality are tools of design, not the primary goal in design.",
"viewingHint": "multi-part",
"metadata": [
{
"date": null,
"host": null,
"lead": null,
"type": null,
"actor": null,
"donor": null,
"genre": null,
"judge": null,
"label": null,

Notes on DCAT Distribution

New Solr fields

  1. dcat_distribution_sm
    • Array of escaped dcat:distribution strings
  2. dcat_landing_page_s
    • Replaces http://schema.org/url reference

Thumbnail

{
"type": "Annotation",
"@context": [
"http://geojson.org/geojson-ld/geojson-context.jsonld",
"http://iiif.io/api/presentation/3/context.json"
],
"motivation": "georeference",
"target": {
"type": "Image",
"source": "https://iiif.princeton.edu/loris/iiif/2/figgy_prod%2F50%2Fee%2F61%2F50ee61a99bad444490534946f2e8b929%2Fintermediate_file.jp2/full/full/0/default.jpg",
{
"type": "Annotation",
"@context": [
"http://geojson.org/geojson-ld/geojson-context.jsonld",
"http://iiif.io/api/presentation/3/context.json"
],
"motivation": "georeference",
"target": {
"type": "Image",
"source": "https://iiif.princeton.edu/loris/iiif/2/figgy_prod%2F09%2F8e%2F47%2F098e47ae315441ee9d56f849d71ac96e%2Fintermediate_file.jp2/full/full/0/default.jpg",
{"mosaicjson": "0.0.2", "minzoom": 16, "maxzoom": 23, "bounds": [-86.1602783203125, 40.41767833585549, -86.1053466796875, 40.526326510744], "center": [-86.1330299544224, 40.47097685335751, 20], "tiles": {"0320001012313313": ["https://oin-hotosm.s3.amazonaws.com/5cc34ed53dc94a0006940505/0/5cc34ed53dc94a0006940506.tif"], "0320001013202202": ["https://oin-hotosm.s3.amazonaws.com/5cc34ed53dc94a0006940505/0/5cc34ed53dc94a0006940506.tif"], "0320001012313331": ["https://oin-hotosm.s3.amazonaws.com/5cc34ed53dc94a0006940505/0/5cc34ed53dc94a0006940506.tif"], "0320001013202220": ["https://oin-hotosm.s3.amazonaws.com/5cc34ed53dc94a0006940505/0/5cc34ed53dc94a0006940506.tif"], "0320001013220001": ["https://oin-hotosm.s3.amazonaws.com/5cc34ff43dc94a0006940508/0/5cc34ff43dc94a0006940509.tif"], "0320001012331123": ["https://oin-hotosm.s3.amazonaws.com/5cdabd0107186b00060f6c9c/0/5cdabd0107186b00060f6c9d.tif"], "0320001012331132": ["https://oin-hotosm.s3.amazonaws.com/5cdabd0107186b00060f6c9c/0/5cdabd0107186b00060f6c9d.tif", "h
@eliotjordan
eliotjordan / WMTSCapabilities.xml
Created December 14, 2021 19:14
WMTSCapabilities.xml - Example
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<ows:ServiceIdentification>
<ows:Title>"Cloud Optimized GeoTIFF"</ows:Title>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
@eliotjordan
eliotjordan / info.json
Created January 28, 2022 19:06
TileJSON.io - Balkans
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},
@eliotjordan
eliotjordan / info.json
Created February 2, 2022 21:26
TileJSON.io - The Balkans [and] Turkey : G.S.G.S. no. 2097
{
"baseLayer": {
"tilejson": "2.2.0",
"name": "base",
"version": "1.0.0",
"scheme": "xyz",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png"
]
},