随笔分类 - Python--GIS
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- from shapely.geometry import asShape import json import os from pyproj import Proj, transform # define t
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- from matplotlib import pyplot from descartes import PolygonPatch from shapely.ops import polygonize from shapely.geometry import Polygon, LineString, Poi...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import os import json from shapely.geometry import asShape # define output GeoJSON file res_line_intersect = os.path.realpath("../geodata/ch05-01-geojso...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- from math import sqrt import shapefile from matplotlib import pyplot from descartes import PolygonPatch from shapely.geometry import Polygon, LineString...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import psycopg2 import json from geojson import loads, Feature, FeatureCollection # Database Connection
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- from osgeo import ogr from osgeo import gdal # get raster datasource open_image = gdal.Open( "../geodata/cadaster_borders-2tone-black-white.png" ) inpu...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- from osgeo import ogr from osgeo import gdal # set pixel size pixel_size = 0.00002 no_data_value = -9999 # Shapefile input name # input projection must...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import subprocess # database options db_schema = "SCHEMA=geodata" overwrite_option = "OVERWRITE=YES" geom_type = "MULTILINESTRING" output_format = "Post...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import os try: import ogr import osr except ImportError: from osgeo import ogr, osr shp_driver = ogr.GetDriverByName('ESRI Shapefile') #...
阅读全文
摘要:from osgeo import ogr shp_driver = ogr.GetDriverByName('ESRI Shapefile') shp_dataset = shp_driver.Open(r'../geodata/schools.shp') shp_layer = shp_dataset.GetLayer() shp_srs = shp_layer.GetSpatialRef()...
阅读全文
摘要:#!/usr/bin/env python # -*- coding: utf-8 -*- import urllib.request import os def get_epsg_code(epsg): """ Get the ESRI formatted .prj definition usage get_epsg_code(4326) We use the ht...
阅读全文
摘要:#!/usr/bin/env python# -*- coding: utf-8 -*- import os try: import ogr import osr except ImportError: from osgeo import ogr, osr shp_driver = ogr.GetD
阅读全文
摘要:Library name Description Reason to install NumPy This adds support for large multidimensional arrays and matrices It is a requirement for many other l
阅读全文
摘要:# # MeteorologicalImageLoad.py# Created on: 2014-01-24 08:33:03.00000# Created by SmartMap# Usage: MeteorologicalImageLoad <analyzeType> <analyzeResul
阅读全文
浙公网安备 33010602011771号