Skip to content

Instantly share code, notes, and snippets.

View bmoregeo's full-sized avatar

Christopher Fricke bmoregeo

View GitHub Profile
-- PG_Geometry Line feature class -> PG Routing
-- Add Required Fields
ALTER TABLE way ADD COLUMN "source" integer;
ALTER TABLE way ADD COLUMN "target" integer;
-- Build Topology (3D)
SELECT sde.pgr_createTopology3d('way', 0.01, 'shape', 'objectid')
-- Add Indices
@bmoregeo
bmoregeo / csv2shp.py
Created October 15, 2014 13:50
Batch convert CSV to Shapefile with arcpy
import arcpy
import os
def csv2shp(csv_file, field_x, field_y, shape_file):
"""
Convert a CSV file with x/y fields into a Shapefile
"""
table_view = 'csv_file_as_view'
layer = 'xy_event_layer'
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.