摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- from shapely.geometry import LineString from shapely.geometry import MultiLineString from scipy.spatial import Voronoi import numpy as np class Centerli... 阅读全文
posted @ 2016-08-20 19:54 ParamousGIS 阅读(2919) 评论(0) 推荐(1) 编辑
摘要: http://blog.thehumangeo.com/2014/05/12/drawing-boundaries-in-python/ 1、三角形面积=1/2*底*高(三边都可做底)2、三角形面积=1/2absinC=1/2acsinB=1/2bcsinA3、三角形面积=abc/4R(其中R是三角 阅读全文
posted @ 2016-08-20 19:13 ParamousGIS 阅读(917) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- import networkx as nx import numpy as np import json import matplotlib.pyplot as plt from shapely.geometry import asLineString, asMultiPoint def get_pat... 阅读全文
posted @ 2016-08-20 18:49 ParamousGIS 阅读(3882) 评论(1) 推荐(0) 编辑
摘要: 图的类型 Graph类是无向图的基类,无向图能有自己的属性或参数,不包含重边,允许有回路,节点可以是任何hash的python对象,节点和边可以保存key/value属性对。该类的构造函数为Graph(data=None,**attr),其中data可以是边列表,或任意一个Networkx的图对象,默认为none;attr是关键字参数,例如key=value对形式的属性。 ... 阅读全文
posted @ 2016-08-20 18:18 ParamousGIS 阅读(57076) 评论(1) 推荐(2) 编辑
摘要: 网上关于Pgrouting的使用介绍太简单了,这里想详细的总结一下Pgrouting的使用,其实主要参照官方文档:http://workshop.pgrouting.org/ 第一步:配置环境 关于PostgreSQL 、postgis以及pgrouting可以去官网下载,这里使用Pgrouting2.0 PostgreSQL与postgis安装可以参照网上教程 ... 阅读全文
posted @ 2016-08-20 16:26 ParamousGIS 阅读(4896) 评论(1) 推荐(0) 编辑
摘要: #!/usr/bin/env python #****************************************************************************** # $Id$ # # Project: GDAL Python Interface # Purpose: Script to merge greyscale as intensity ... 阅读全文
posted @ 2016-08-20 15:13 ParamousGIS 阅读(783) 评论(0) 推荐(0) 编辑
摘要: 计算坡度与坡向 #!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess # SLOPE # - To generate a slope map from any GDAL-supported elevation raster : # gdaldem slope input_dem output_slope_map" # [-... 阅读全文
posted @ 2016-08-20 15:04 ParamousGIS 阅读(3332) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- from osgeo import gdal from numpy import gradient from numpy import pi from numpy import arctan from numpy import arctan2 from numpy import sin from numpy... 阅读全文
posted @ 2016-08-20 12:06 ParamousGIS 阅读(481) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- import sys, gdal, os from gdalconst import GA_ReadOnly from os.path import realpath from shapely.geometry import LineString #根据坐标点计算该点所在栅格上的值 def get_ele... 阅读全文
posted @ 2016-08-20 11:51 ParamousGIS 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 裁剪(求异) 合并(无dissolve) 合并(有dissolve) utils.py union_dissolve.py identity 阅读全文
posted @ 2016-08-20 11:38 ParamousGIS 阅读(1169) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- import math import os from shapely.geometry import shape, Point import json def pairs(lst): """ yield iterator of two coordinates of linestring ... 阅读全文
posted @ 2016-08-20 11:07 ParamousGIS 阅读(802) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- import gdal import xlrd import shapefile # open the excel file excel_file = xlrd.open_workbook("../geodata/highest-mountains-europe.xlsx") # get the fi... 阅读全文
posted @ 2016-08-20 10:19 ParamousGIS 阅读(3116) 评论(0) 推荐(0) 编辑
摘要: dojo.require("esri.tasks.closestfacility"); var closestFacilityTask, params; var facilityPointGraphicsLayerName = "facilityPointGraphicsLayer"; var incidentPointGraphicsLayerName = "incidentPointGrap... 阅读全文
posted @ 2016-08-20 09:58 ParamousGIS 阅读(782) 评论(0) 推荐(0) 编辑