Skip to content

Instantly share code, notes, and snippets.

View fils's full-sized avatar
:octocat:

Douglas Fils fils

:octocat:
View GitHub Profile
@fils
fils / spatialOptions.json
Created June 1, 2020 20:42
Represent 4 ways to represent spatial in JSON-LD
{
"@context": {
"@version": 1.1,
"geoblob": {
"@id": "http://example.com/vocab/json",
"@type": "@json"
},
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
@fils
fils / geotest3.json
Created June 1, 2020 15:03
JSON-LD with 3 spatial approaches
{
"@context": {
"@version": 1.1,
"geoblob": {
"@id": "http://example.com/vocab/json",
"@type": "@json"
},
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
{
"@context": {
"@version": 1.1,
"geoblob": {
"@id": "http://example.com/vocab/json",
"@type": "@json"
},
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
@fils
fils / jsonldspatial3methods.json
Created June 1, 2020 14:45
A JSON-LD documet with three approach. GeoSPAQL WKT, GeoJSON via linked data, JSON Literal
{
"@context": {
"@version": 1.1,
"geoblob": {
"@id": "http://example.com/vocab/json",
"@type": "@json"
},
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
@fils
fils / jsonldwkt.json
Created May 31, 2020 15:52
JSON-LD with WKT
{
"@context": {
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"description": "http://igsn.org/core/v1/description",
"geosparql" : "http://www.opengis.net/ont/geosparql#"
},
"@id": "https://samples.earth/id/do/bqs2dn2u6s73o70jdup0",
"@type": "http://igsn.org/core/v1/Sample",
@prefix dash: <http://datashapes.org/dash#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema: <http://schema.org/> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
schema:TropicalShape
a sh:NodeShape ;
sh:targetClass <http://schema.org/GeoCoordinates> ;
{
"@context": "https://schema.org/",
"@type": "Dataset",
"name": "DS1",
"url": "http://www.foo.com/1",
"spatialCoverage": {
"@type": "Place",
"geo": {
"@type": "GeoShape",
"box": "26 -175 62 -42",
@fils
fils / spatialtest.jsonld
Last active May 29, 2020 13:31
Test JSON-LD with many spatial elements in array
{
"@context": "https://schema.org/",
"@type": "Dataset",
"name": "DS1",
"url": "http://www.foo.com/1",
"spatialCoverage": {
"@type": "Place",
"geo": [
{
"@type": "GeoCoordinates",
@fils
fils / nwmfiles.go
Last active February 11, 2020 02:14
package main
import (
"fmt"
"time"
"github.com/fhs/go-netcdf/netcdf"
)
func main() {