• Save
Python and GIS - ASU MAS-GIS Talk
Upcoming SlideShare
Loading in...5
×
 

Python and GIS - ASU MAS-GIS Talk

on

  • 2,530 views

James talks to ASU MAS-GIS students about the ways Python can help them.

James talks to ASU MAS-GIS students about the ways Python can help them.

Statistics

Views

Total Views
2,530
Views on SlideShare
2,527
Embed Views
3

Actions

Likes
0
Downloads
0
Comments
0

2 Embeds 3

http://www.docshut.com 2
http://www.slashdocs.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Python and GIS - ASU MAS-GIS Talk Python and GIS - ASU MAS-GIS Talk Presentation Transcript

  • GIS: You’ve Come a Long Way Baby! James Fee - Chief Evangelist, WeoGeoMonday, October 29, 12
  • History of GISMonday, October 29, 12
  • Monday, October 29, 12 View slide
  • Early Map MakersMonday, October 29, 12 View slide
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Classic CartographyMonday, October 29, 12
  • Not Much Happens for 300 YearsMonday, October 29, 12
  • Computer ScienceMonday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • CADMonday, October 29, 12
  • Esri in the 70’sMonday, October 29, 12
  • ArcInfoMonday, October 29, 12
  • ARC/INFO Required Prime ComputerMonday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • ArcView IMSMonday, October 29, 12
  • MapObjectsMonday, October 29, 12
  • ArcIMSMonday, October 29, 12
  • ArcGIS DesktopMonday, October 29, 12
  • ArcGIS DesktopMonday, October 29, 12
  • ArcGIS DesktopMonday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Why The History Lesson?Monday, October 29, 12
  • Monday, October 29, 12
  • Monday, October 29, 12
  • Scripting With GISMonday, October 29, 12
  • Scripting With GIS • AMLMonday, October 29, 12
  • Scripting With GIS • AML • SMLMonday, October 29, 12
  • Scripting With GIS • AML • SML • AvenueMonday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications *Monday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications * • VBScriptMonday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications * • VBScript • JavaScriptMonday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications * • VBScript • JavaScript • FlexMonday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications * • VBScript • JavaScript • Flex • ColdFusionMonday, October 29, 12
  • Scripting With GIS • AML • SML • Avenue • Visual Basic for Applications * • VBScript • JavaScript • Flex • ColdFusion • PythonMonday, October 29, 12
  • AML Scripting in ARC/INFO clip  soils  studbndy  stdysoilMonday, October 29, 12
  • Python Scripting in ArcGIS arcpy.Clip_analysis(soils.shp,  studbndy.shp,  stdysoil)Monday, October 29, 12
  • Python Scripting With ArcPy import  arcpy from  arcpy  import  env env.workspace  =  "c:/workspace" #  variables in_features  =  "soils.shp" clip_features  =  "study_boundary.shp" out_feature_class  =  "c:/workspace/output/study_area_soils.shp" xy_tolerance  =  "" #  Execute  Clip arcpy.Clip_analysis(in_features,  clip_features, out_feature_class,  xy_tolerance)Monday, October 29, 12
  • It’s teh awesome!http://www.flickr.com/photos/soundfromwayout/143822346Monday, October 29, 12
  • Export to KML import  arcpy arcpy.CheckOutExtension(“3D”) env.workspace  =  "c:/workspace" #  variables in_feature  =  "c:/data/TIGER2009/04/ARIZONA/tl_2009_04_county.lyr" out_feature  =  "c:/temp/output.kmz" #  Execute  KML  Export arcpy.LayerToKML_conversion(in_feature,  out_feature,1)Monday, October 29, 12
  • Export to KML arcpy.LayerToKML_conversion(input.shp,  output.kml,  scale)Monday, October 29, 12
  • ArcPyMonday, October 29, 12
  • ArcPy •ArcPy - Provides Python access to all geoprocessing tools.Monday, October 29, 12
  • ArcPy •ArcPy - Provides Python access to all geoprocessing tools. •ArcPy modules - a python file that includes functions and classes (such as arcpy.mapping or arcpy.sa). Sometimes called libraries.Monday, October 29, 12
  • ArcPy •ArcPy - Provides Python access to all geoprocessing tools. •ArcPy modules - a python file that includes functions and classes (such as arcpy.mapping or arcpy.sa). Sometimes called libraries. •ArcPy classes - provides framework to create something (such as Polygon)Monday, October 29, 12
  • ArcPy •ArcPy - Provides Python access to all geoprocessing tools. •ArcPy modules - a python file that includes functions and classes (such as arcpy.mapping or arcpy.sa). Sometimes called libraries. •ArcPy classes - provides framework to create something (such as Polygon) •ArcPy functions - does specific tasks (all geoprocessing tools are provided as functions)Monday, October 29, 12
  • Python LibrariesMonday, October 29, 12
  • Python Scripting With WeoGeo import  WeoGeoAPI #do  a  simple  browse  of  WeoGeo  Market session  =  WeoGeoAPI.weoSession(market.weogeo.com,  ,  ) session.connectToMarket() #send  some  parameters  to  look  for  vector  data  sets  covering   Washington,  DC. datasets  =  session.getDatasets(JSON,   &data_type=VECTOR&per_page=2&page=1&north=39.043&south=38.767&we st=-­‐77.2&east=-­‐77.906) #prints  the  raw  JSON  response print  datasetsMonday, October 29, 12
  • { Python Scripting With        per_page:  2, WeoGeo        total_entries:  34,        current_page:  1,        total_pages:  17,        items:  [                {                        rating:  0.0,                        projection:  geo,                        provider_margin:  1995.0,                        uncompressed_misc_files_size:  7683891,                        spatial_resolution:  0,                        children_count:  0,                        datum:  WGS84,                        library:  {                                name:  Pitney  Bowes  -­‐  Business  Insight,                                id:  112                        },                        kml_file_size:  0,                        hosted:  True,                        market:  Complete,                        center_lat:  38.8051135,                        layers:  [                                all                        ],                        east:  -­‐74.986282,                        votes:  0,                        content_license:  {                                url:  http:  //licenses.weogeo.com/licenses/8/original.PDF?1273263090,                                name:  PBBI  Software  and  Data  End  User  License  v.  April  2008                        },                        data_type:  VECTOR,                        royalty_model:  CREDITED,                        west:  -­‐79.487651,                        scales:  6;7;8;9;10;11;12,                        provider_discount_expires_at:  None,                        boundaries:  {                                geo:  {                                        proj4:  +proj=latlong  +datum=wgs84,                                        north:  39.723622,                                        west:  -­‐79.487651,                                        datum:  WGS84,                                        projection_datum:  geo-­‐wgs84,                                        east:  -­‐74.986282,                                        south:  37.886605                                },                                tiles:  {                                        number_of_lines:  316,                                        number_of_samples:  316,                                        datum:  WGS84,                                        line_pixel_size:  -­‐830.510836842,                                        sample_pixel_size:  1585.72818023,                                        proj4:  +proj=merc  +a=6378137  +b=6378137  +lat_ts=0.0  +lon_0=0.0  +x_0=0.0  +y_0=0  +k=1.0  +units=m  +nadgrids=@null  +no_defs,                                        projection_datum:  spherical_mercator,                                        west:  -­‐8848524.83367,                                        north:  4825860.68838,                                        east:  -­‐8347434.72872,                                        south:  4563419.26394                                },                                native:  {                                        number_of_lines:  316,                                        number_of_samples:  316,                                        datum:  WGS84,                                        line_pixel_size:  -­‐830.510836842,                                        sample_pixel_size:  1585.72818023,                                        proj4:  +proj=merc  +a=6378137  +b=6378137  +lat_ts=0.0  +lon_0=0.0  +x_0=0.0  +y_0=0  +k=1.0  +units=m  +nadgrids=@null  +no_defs,                                        projection_datum:  spherical_mercator,                                        west:  -­‐8848524.83367,                                        north:  4825860.68838,                                        east:  -­‐8347434.72872,                                        south:  4563419.26394                                },                                data:  {                                        proj4:  ,                                        datum:  WGS84,                                        projection_datum:  geo-­‐WGS84                                },                                baseimage:  {                                        number_of_lines:  0,                                        number_of_samples:  0,                                        west:  -­‐8848524.833673440000000,                                        line_pixel_size:  0,                                        sample_pixel_size:  0,                                        proj4:  spherical_mercator,                                        projection_datum:  spherical_mercator,                                        north:  4945185.028635530000000,                                        east:  -­‐8347434.728720820000000,                                        south:  4444094.923682910000000                                }                        },                        tile_layer_type:  xyz,                        provider_discount_rate:  100,                        provider_discount_expire_option:  True,                        x_conv:  1,                        parents_count:  0,                        status:  Approved,                        north:  39.723622,                        description:  <b>StreetPro  USA</b><br>nVersion  2009.12<br><br>  nStreetPro  offers  users  a  premier  street-­‐level  data  product  featuring  accuracy  and  street  display  quality  unparalleled  in  the  industry.  It  reflects  real  world  geographic  conditions  Monday, October 29, 12 with  the  most  current  street  data  available.<br  />With  StreetPro,
  • Rails, Java, PythonMonday, October 29, 12
  • Rails, Java, PythonMonday, October 29, 12
  • Rails, Java, PythonMonday, October 29, 12
  • James Fee jfee@weogeo.com @cageyjames spatiallyadjusted.com Thanks!Monday, October 29, 12