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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function str2feature(str) { | |
/* | |
input: string "lat_deg = 54.66972|lon_deg = 25.28512|position=right|label = Вильнюс}}" | |
output: GeoJSON Feature { "type": "Feature", "properties": { "label": "dsfdsf", "position": "dsfdsf" }, "geometry": { "type": "Point", "coordinates": [ 30.7096, 59.8684 ] } } |
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 python | |
# -*- coding: utf-8 -*- | |
# parse each file from the photo collection and export data into CSV. | |
# will need: os.listdir(path) | |
#http://robertcarlsen.net/2010/02/23/parsing-foursquare-kml-files-1113 | |
import sys | |
import os | |
import codecs |
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
import requests | |
import urllib2 | |
ngw_root = 'http://trolleway.nextgis.com' | |
ngw_creds = ('', '') | |
headers = {'Content-type': 'application/x-www-form-urlencoded'} | |
payload = {'file':urllib2.urlopen('http://trolleway.nextgis.com/api/resource/826/feature/5/attachment/37/image'),'name':'filename.jpg'} | |
print 'Upload attachment to ' + ngw_root + '/api/component/file_upload/upload' | |
req = requests.post(ngw_root + '/api/component/file_upload/upload', data=payload, auth=ngw_creds, headers=headers) |
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
vk_gid = '' #user id | |
#obtain client_id from VK: create new standalone app at https://vk.com/editapp?act=create | |
vk_client_id = '' | |
vk_scope = 'wall,photos' | |
#open in browser https://oauth.vk.com/authorize?client_id=0000000000&scope=wall,photos&v=5.60&response_type=token&redirect_uri=https://oauth.vk.com/blank.html | |
#and paste token here | |
vk_token = '' |
Loading
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
""" | |
Define new functions using @qgsfunction. feature and parent must always be the | |
last args. Use args=-1 to pass a list of values as arguments | |
""" | |
from qgis.core import * | |
from qgis.gui import * | |
import re |
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
POST /osc/commands/execute | |
{ | |
"name": "camera.startSession", | |
"parameters": {} | |
} | |
#shoot | |
192.168.1.1/osc/commands/execute | |
{ | |
"name": "camera.takePicture", |
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
exiftool -a -G1 -s R0010031.JPG | |
[ExifTool] ExifToolVersion : 10.08 | |
[System] FileName : R0010031.JPG | |
[System] Directory : . | |
[System] FileSize : 4.0 MB | |
[System] FileModifyDate : 2016:01:11 22:16:42+03:00 | |
[System] FileAccessDate : 2016:01:11 23:27:07+03:00 | |
[System] FileCreateDate : 2016:01:11 23:27:07+03:00 | |
[System] FilePermissions : rw-rw-rw- | |
[File] FileType : JPEG |
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
# -*- coding: UTF-8 -*- | |
''' | |
Generate a geojson file with coordinates of all photos in folder. | |
Using exiftool via exiftool module | |
Usage: | |
python geo3.py "E:\PHOTO\z_bat\geo\test1" |
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/python | |
# -*- coding: utf-8 -*- | |
import ijson | |
from shapely.geometry import Polygon, MultiPolygon | |
import urllib |