This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WORK FLOW:Convert Shape files into GeoJSON using GDAl library | |
Two step process. | |
Step 1.Convert Data in WGS 84 projection --> 2. Convert shp into Geojson using ogr2ogr | |
STEP 1. Make sure your data is in EPSG 4326 (Geographic projection WGS 84) is NOT Web Mercator projection | |
(most commonly used projection that can be use to post onto GitHub page is web mercator is EPSG:3857). | |
Before geoJSON conversion, make sure data isn't in WGS 84 projection already by checking for projection meta using ogrinfo command. | |
Convert WA State Plane EPSG 2926 to WGS 84 - EPSG 4326 (Geographic Projection WGS 84) | |
--Use ogrinfo to check the projection of data, example : sewer.shp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "FeatureCollection", | |
"name": "waDotcamera", | |
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | |
"features": [ | |
{ "type": "Feature", "properties": { "CameraID": 8216, "CameraLocation\/Description": null, "CameraLocation\/Direction": "E", "Latitude": 48.1675, "Longitude": -122.1583, "CameraLocation\/MilePost": 0, "CameraLocation\/RoadName": "Airports", "CameraOwner": null, "Description": null, "DisplayLatitude": 48.1675, "DisplayLongitude": -122.1583, "ImageHeight": 197, "ImageURL": "https:\/\/images.wsdot.wa.gov\/airports\/arlwest.jpg", "ImageWidth": 335, "IsActive": "true", "OwnerURL": null, "Region": "NW", "SortOrder": 5300, "Title": "Arlington Airport Northwest" }, "geometry": { "type": "Point", "coordinates": [ -122.1583, 48.1675 ] } }, | |
{ "type": "Feature", "properties": { "CameraID": 8218, "CameraLocation\/Description": null, "CameraLocation\/Direction": "N", "CameraLocation\/Latitude": 48.1675, "CameraLocation\/Longitude": -122.1583, "CameraLocation\/MilePost": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This script uses the concept at https://certbot.eff.org/#ubuntuxenial-other | |
# but overcomes the problem I consistently have of the server (at eff.org) | |
# not being able to connect to this machine. | |
mkdir -p /tmp/www | |
cd /tmp/www | |
sudo python -m SimpleHTTPServer 80 & | |
http_pid=$! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION public.dbs_ned_z( | |
IN text, | |
IN text, | |
OUT text) | |
RETURNS text AS | |
$BODY$ | |
#!/bin/sh | |
url="http://ned.usgs.gov/epqs/pqs.php?output=json&x=$1&y=$2"; /usr/bin/curl -s $url | |
$BODY$ | |
LANGUAGE plsh VOLATILE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install gdal http://giscollective.org/installing-gdal-mac/ | |
use github http://www.thinkful.com/learn/a-guide-to-using-github-pages/start/existing-project/user-page/ | |
git add . | |
551 git commit -a -m "testing GeoJSON format" | |
552 git config --global user.name "mccombsp-kingco" | |
553 git config --global user.emal mccombs@imperium.org | |
554 git commit --amend --reset-author | |
555 git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bulk convert shapefiles to geojson using ogr2ogr | |
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/ | |
# Note: Assumes you're in a folder with one or more zip files containing shape files | |
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere) | |
#geojson conversion | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} |