Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

-1
votes
1answer
53 views

Help interpreting open text file [closed]

I have an existing Arcpy script written by others that I need help interpreting. The script reads records from a feature class and loops through and writes them to a log file. Here is the section I ...
-1
votes
1answer
339 views

How to calculate the length of clipped lines using buffered points using ArcPy? [closed]

I need to create a buffer around each point of a points feature class. I would then want to use the point buffers to clip the streets feature class to calculate the length of the clipped streets using ...
-1
votes
1answer
334 views

how to run an aml in python

I am trying to run a aml in a python program I am writing and haven't been having much luck figuring out the correct way to run the aml. The aml requires workstation to be in grid mode. Any tips? I am ...
-1
votes
1answer
618 views

How can i draw a perpendicular line in a stream segment in a regular interval of 30m? [duplicate]

I have a stream segment which is polyline feature. Now I want to draw a line which is perpendicular to stream segment at a interval of 30m. How can i do it using python ? Do you have idea on this .
-1
votes
1answer
57 views

Convert Road layer shapefile into a graph

I'm going to use Astar algorithm to find a path between two selected points.And I used the following code for that.Is there any way I could convert my Road Layer shapefile into a graph, which can be ...
-1
votes
1answer
46 views

define error for python script to import arcmap [closed]

i want to create a simple python script for create one file geodatabase but show me define error # Import arcpy module Import arcpy import sys import os from arcpy import env from arcpy.sa ...
-1
votes
1answer
88 views

A formula error in raster calculator with arcgis 10.1

help me to solve a problem at a formula to calculate the susceptibility to landslide that gives me errors when computing with "raster calculator" in arcgis 10.1, the formula is exact but errors in the ...
-1
votes
2answers
704 views

How to compare values from a column in attribute table with values in Dictionary{}?

I am just entering to the python world, hence the level of my question. Can anyone tell me what Python function should I use to compare values stored in one column in an attribute table with values ...
-1
votes
1answer
80 views

ArcGIS python itertools.combinations [duplicate]

There is following sample code combination 5C2. I want to create all combinations 5C1 , 5C3 , 5C4 and 5C5. list = [ 0,1,2,3,4 ] 5C1 means (0),(1),(2),(3),(4),(5) 5C2 means ...
-1
votes
1answer
175 views

Raster produced by Con expression not saving

I cannot get a Con expression to work. Or, if it is working, I cannot get the raster produced by the Con expression to save. I have two rasters and I want the positive difference between the two, and ...
-1
votes
1answer
64 views

Is it possible to import/run AML script into GRASS?

I have an AML script that has instructions to import tmp files of (grid, network, basin...) is there any way to run the script in GRASS? I tried to converted to Python but I couldn't do it for the ...
-1
votes
1answer
283 views

QGIS and Python - create line with multiple points in postgis [closed]

How can I create a line, with Python functions, with many points that are records in Postgis? Thank you
-1
votes
1answer
123 views

GeoPortal Managing Tool [closed]

i know in this site everybody more or less have been setup a geoportal for showing their basemaps and analysis on local or net for their workers or conserned people in the net. it is obvious that in ...
-1
votes
0answers
48 views

ImportError when trying to import ephem module into ArcGIS Python script tool

I have ArcGIS 10.2.1 installed with Python 2.7 installed. Subsequently I installed Python 2.6 in the C:\ directory. I've downloaded and installed ephem 3.7.5.3. However, I keep getting the following ...
-1
votes
1answer
61 views

plypython set-up

I am trying to set up plypython on the following system: Windows 8.1 PostgreSQL 9.2 64-bit PostGIS 2.0 Python 2.7.05 I have added plpython2.dll to \PostgreSQL\9.2\lib When I run: CREATE ...
-1
votes
1answer
202 views

Calculating intersection between points and polygon in shapefile

I want accomplish the following using command line python tools only (shapely + fiona) I was wondering if there was a straightforward way for me to do the following: Read in a shapefile (all ...
-1
votes
1answer
204 views

How to Geocode use GeoPy API combined with GDAL Python bindings?

My question is related to the 'How to Geocode 300,000 addresses on the fly?' topic that has been asked by Mehul Nahar. I'm interested in running the processes explained by capooti in response to mehul ...
-1
votes
1answer
90 views

How to find the most east or west longitude around the date line

I've got a python script that is comparing extents of rasters in various projections. Generally it works, but sometimes, especially when the rasters are global in extent or cross the dateline it ...
-2
votes
1answer
208 views

Creating a python script to import an excel spreadsheet, create shapefile and do some analysis [closed]

I am trying to write a script that does the following. Imports an xls file containing x, y, and other columns with data. I want to make this into a point shape file. I want to take that point ...
-2
votes
1answer
145 views

QGIS converting to ASCII question

I am attempting to do some analysis on a raster file and I need to convert it to ASCII. In QGIS, I used [Raster -> Conversion -> Translate] with the asc file format, and I suspect it is simply ...
-2
votes
2answers
1k views

How to avoid ImportError: No module named arcpy causing Failed to execute (Script) error?

I have a proplem with arc hydro in arcpy,i want to create a simple script where automated some tools from archydro in arcpy.. I use arcmap 10.1 and python 1.7,my import is one dem and my export is a 6 ...
-2
votes
1answer
194 views

How to write Process Dialog log information to text file in ArcGIS?

I have created a custom model. When this model is run, it shows a process dialog which has some log information. I want to write that log information into the text file for further analysis. Does ...
-2
votes
1answer
82 views

How to create a link in the message body of email with Python? [closed]

I want to send an email with python that contains as a link in the body of an email as well. This link is actually a path to a file. If a receiver clicks on link It should open a folder where the file ...
-3
votes
2answers
101 views

How to get layer extension info via Arcpy

I want to get file format of a layer with using Arcpy. I am writing a tool that needs to take raster or feature extension like SHP, TIFF etc. Which functions should i use ? Note: I use ArcGIS 10
-3
votes
2answers
615 views

What does Runtime error : 'NoneType' object has no attribute '<field_name>' mean?

Here is my code #arcpy import arcpy,sys from arcpy import env env=r"C:\Users\Jaya\Desktop\python_practice" totalRec=arcpy.GetCount_management("river") rows=arcpy.SearchCursor("river") ...
-3
votes
1answer
213 views

How to calculate altitude with given lat,long position?

I'm new to GIS. I want to calculate the elevation of any point on earth giving lat, Long (for example like google elevation Api, or the earth tools: http://www.earthtools.org/webservices.htm # ...
-4
votes
1answer
875 views

How to script a csv to file geodatabase tool?

I have many separate field data files in CSV format and I wish to automatically convert these CSV files into a geodatabase to be able to load them into a schema I created for them in my new ArcSDE ...
-4
votes
1answer
41 views

how solve this proplem :NoneType' object has no attribute 'start' [closed]

patternRE = re.compile('(^|\s|\")([^\s]+?)\",{'+str(HeaderLineIndex)+'}') #patternRE= '\n("."){'+str(HeaderLineIndex)+'}' #patternRE=re.compile('(^|\s|\")([^\s]+?)\",') Buffer = ...