GDAL and Elasticsearch examples
Shapefile
Import shapefile into Elasticsearch
ogr2ogr -f ElasticSearch \
-lco NOT_ANALYZED_FIELDS={ALL} \
http://elastic:changeme@localhost:9200 \
var gbfs2geojson = require("gbfs2geojson-js"); | |
var fs = require("fs"); | |
var autoDiscoveryUrl = | |
"https://ckan0.cf.opendata.inter.prod-toronto.ca/dataset/2b44db0d-eea9-442d-b038-79335368ad5a/resource/142dfb32-d81b-474b-811a-dfc47560ac26/download/bike-share-json.json"; | |
var data; | |
gbfs2geojson.getAllData(autoDiscoveryUrl, data, (data, err) => { | |
if (err) { |
GET _search | |
{ | |
"query": { | |
"match_all": {} | |
} | |
} | |
GET openstreetmap-2021.03.10/_mapping | |
GET openstreetmap-ways/_mapping |
OSMID [n|r|w][0-9]+ | |
NODES (%{OSMID},?)+ | |
MEMBERS (%{OSMID}@(\S+)?,?)+ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Display a map</title> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" /> | |
<script src="https://api.mapbox.com/mapbox-gl-js/v1.7.0/mapbox-gl.js"></script> | |
<link href="https://api.mapbox.com/mapbox-gl-js/v1.7.0/mapbox-gl.css" rel="stylesheet" /> | |
<style> | |
body { |
jq -Rs @base64 MYFILENAME | jq "{ data: . }" > myobject.json |
ogr2ogr -f ElasticSearch \
-lco NOT_ANALYZED_FIELDS={ALL} \
http://elastic:changeme@localhost:9200 \
const faker = require('faker'); | |
const moment = require('moment'); | |
const fs = require('fs'); | |
const stream = fs.createWriteStream('./access.log', { | |
flags: 'a' | |
}); | |
function writeToStream(n) { | |
for (; n < 1000000; n++) { |
foreach ($f in Get-ChildItem "${PWD}" -Filter *.kmz) { | |
docker run -it -v ${PWD}:/data geodata/gdal ogr2ogr -f "ESRI Shapefile" $f.Name.Replace('kmz', 'shp') $f.Name | |
} |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content="Example of using AGSWalk in client JavaScript to list services from an ArcGIS Server URL"> | |
<title>AGSWalk - List ArcGIS Server Rest Services</title> | |
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.9.0/css/tachyons.min.css"/> | |
</head> | |
<body> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Choropleth Tutorial - Leaflet</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1.0"> | |
<link rel="shortcut icon" |