A version of the Python programming language

learn more… | top users | synonyms

1
vote
1answer
33 views

Writing multiple file geodatabase tables into csv file with arcpy

I was asking a question about Merging geodatabase previously, (link: Merge from arcpy.ListTables() producing duplicate rows?) and although the script worked, it took more than 9 hours to run when ...
1
vote
1answer
22 views

Writing list of feature classes with fields to one csv file per feature class?

I have a database with multiple feature classes. Now I extracted a list of feature classes and a list of fields. I figured out how to write the list of feature classes and the corresponding fields to ...
1
vote
1answer
29 views

Python Hyperlinking Script in Arcmap 10.2 [on hold]

I have the below python script which recursively walks through a directory and finds, then opens the associated parcel pdf file. How would I modify this to not be recursive but to just look in the ...
-2
votes
0answers
23 views

Create junction point and define reach in stream network using python (Without any GIS software) [closed]

I have a stream network shape file with proper attribute. I want to create Junction point and define reach.
2
votes
1answer
64 views
+50

How to get layers from a specific store of geoserver using python gsconfig?

I'm using gsconfig python library to acess geoserver rest, my question is how can i get layers from a specific store ? I'm tried as follow: from geoserver.catalog import Catalog ...
0
votes
0answers
27 views

Changing default precision and scale of number fields in ArcSDE geodatabase table?

After I change the precision and scale for my short, long, float, and double field types when creating a table in ArcMap SDE geodatabase, ArcMap will reset my precision and scale to default values. ...
0
votes
0answers
29 views

Change python installation directory arcgis

I've recently installed arcgis 10.2 on C: of my machine, I did this while my external HDD was plugged into E:, and the installer put python onto the E: Why it would do this I have no idea. Now I can't ...
1
vote
0answers
45 views

How to extract NetCDF raster values to time enabled shapefiles?

Does anyone know a good way to extract NetCDF raster values to each data point from a time enabled shapefile at the correct time? I have tried using a python script tool and a loop that steps ...
0
votes
1answer
59 views

Extracting NetCDF raster values to time enabled shapefiles - what's wrong with my python script?

I'm trying to make a python script tool that extracts the values from a NetCDF raster to each data point from a time enabled shapefile at the correct time. My NetCDF raster consists of monthly sea ...
0
votes
0answers
11 views

take record from ms-access using python and show it in Qt

I have a ms-access database and i try to make QGIS plugin that take record from table and show it in Qt, database have format like this : NO Skala 1 Skala2 Rekomendasi ...
0
votes
0answers
18 views

How do I install PyProj module for Python 2.7 on Windows 7?

I am having trouble installing the pyproj module for Python 2.7 on Windows 7. I have tried both the 32 and 64 bit installers from this list but the install crashes each time I run it. I have the ...
0
votes
0answers
22 views

Use python to execute GRASS module v.distance

I have successfully use python script to import a line shapefile and a point shapefile into GRASS, and the following are their attribute table in QGIS, line shapefile point shapefile Now I want ...
0
votes
0answers
81 views

Postgres SSL SYSCALL error: EOF detected with python and psycopg

Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected It only occurs when I add a WHERE column LIKE ''%X%'' clause to my ...
1
vote
2answers
59 views

Find all points in a linestring that are contained by a polygon

I'm fairly new to PostGIS, so I apologize if this has been answered before. I have a linestring made up of 4D points and I need to determine which points in this linestring fall within a specific ...
0
votes
0answers
25 views

import libtiff error

I am unable to use libtiff from Python on windows 7. Here is what I get when I try from libtiff import TIFF I do not understand the statement " Make sure that libtiff is installed and its location ...
1
vote
0answers
53 views

Use a Python script to stack layers from multiple directories and produce multiple outputs in ERDAS

I am using ERDAS Imagine 2013 and am trying to create a Python script that takes lists created in another script containing the path to each scene's raw data folder and base image ID's (for example ...
3
votes
1answer
63 views

Reading zipped ESRI BIL files with Python

I asked the question below on StackOverflow, but haven't received any feedback there yet: I have precipitation data from the PRISM Climate Group which are now offered in .bil format (ESRI BIL, I ...
0
votes
0answers
14 views

Parsing file didnt appear in textBrowser

I make QGIS plugin to parsing xml and show parsed file in textBrowser, however when i run the plugin, its still blank ( nothing happend ) and i didn't get error messsage when run it, this is the full ...
0
votes
2answers
33 views

Cell Size parameter for IDW (Spatial Analyst) tool

I am attempting to use the IDW (Spatial Analyst) tool in a Python script however I am a bit confused on what to put for the "Cell Size" optional parameter. When using the tool within ArcMap it seems ...
0
votes
0answers
21 views

Visualize bounding box to square like polygon

I want to add script in my plugin to visualize bounding box into a polygon shape, bounding box i try to visualize have format like this: (X1,Y1) (X2,Y2) (X1,Y2) (X2,Y1) Does QGIS/PYTHON have ...
1
vote
1answer
159 views

How to create a polygon feature class from polylines in Python Arcgis?

I am trying to create a polygon from polylines. I've created this script but it gives errors of Arrays. Thanks. import arcpy polyline=r'C:\temp\temp_lines.shp' ...
0
votes
0answers
26 views

Producing latitude longitute coordinates in csv file based on place names on existing csv file

I have a code that takes the HTML code and extracts the table to put it in CSV file. I want to further take the place names inside csv file and add two columns that show lat and longitude. Here is ...
1
vote
1answer
51 views

Habitat fragmentation tool error

I am trying to calculate the habitat fragmentation of a forested region in Africa in order to protect the areas less fragmented. I have used the tool "Landscape Fragmentation Tool V2 requiring Spatial ...
0
votes
2answers
80 views

Python ArcGIS 10.0 Expanding select layer by location from point (walking selection)

I have an old ArcView 3 tool which I've been tasked with converting to Python. I'm breaking it down into stages, but there's a "walking selection" I can't trap. To put the query in context, the user ...
1
vote
1answer
48 views

Unexpected output when using gdal_rasterize

Ok, I used the following code for converting my layer into raster format but I get a tif file that is completely black or white... from osgeo import gdal, ogr # Define pixel_size and NoData value ...
0
votes
1answer
13 views

Fiona error on installation

Receiving the following error when installing Fiona.Does anyone can guide ? error: Unable to find vcvarsall.bat
1
vote
0answers
44 views

Programmatically selecting features by polygon

Expanding upon this post how could you use QGis to programmatically draw a selection polygon and select features within the polygon? I have been using QgsMapToolEmitPoint(self.canvas), to find and ...
0
votes
1answer
74 views

batch buffer with different distances with python 2.7 in arcgis 10.1

I am trying to write a "smart" way in Python to process multiple buffer to lines, polygons and points with different distances. I use Python and ArcMap 10.1. I can figure out to separate lines, ...
2
votes
0answers
42 views

How to use matplotlib with ArcGIS 10.1 without Microsoft Visual C++ Runtime Error?

I have problems using the matplotlib for python with ArcGIS 10.1 If I run the code below as a script tool in ArcMap. No pdf is generated and when I close ArcMap this error is shown. If I run the ...
2
votes
4answers
51 views

How to Add (+) up integers in a field and print a total count in pyhton 2.7

I'm a complete beginner to python. I have what I hope to be a simple question. I want to run a bit of script in IDLE so that it adds up all figures in a table under attribute name "Tot_Aff". When I ...
1
vote
1answer
59 views

Find minimum elevation along a polyline and return xy or point?

Using ArcGIS 10.1 and Python IDLE 2.7.2... I'm trying to find the minimum value of a polyline with a raster layer and turn that LOCATION into a point. I put everything together in model builder, but ...
1
vote
0answers
50 views

How to create a circle vector layer with 12 sectors with Python and to save average value of underlying raster in each sector?

Hi I am writing a code with Python 2.7 using Arcpy 10.1 and I guess I am doing stuck with a silly problem that lies under my eyes. I have created a grid of points (with "Create fishnet" function) over ...
0
votes
1answer
64 views

Unknown error concurring when developing QGIS 2.0.1 plugin in Windows 7

I am following the tutorial found here for developing a simple QGIS plugin within QGIS 2.0.1 installed on Windows 7. However, as I have began to try developing a link between the GUI and each the ...
6
votes
1answer
306 views

Increasing speed of Python scripts using arcpy

Update 4/11/2014 It looks like the script was getting hung up on the Delete Features tool, so I switched to Truncate Table, as suggested in the answer below. I also removed the unused variables from ...
0
votes
1answer
23 views

how to calculate the average temperature of each band of a .grd file?

I am having a GRD file in which the temperature at different longitude and latitude are given in a 32x35 array for one day(band),i am having 365 such bands and want to calculate the average of all ...
4
votes
1answer
106 views

How to select all values by default in arcgis tool's multivalue parameter using python?

I am using ArcGIS 10.2 and have three parameters, Feature class, field and a multivalue parameter respectively in ArcGIS tool. I populate multivalue parameter with unique values of feature class on ...
0
votes
1answer
20 views

GRASS module g.mremove returns irrational outputs

I want to use g.mremove to remove multiple files in my mapset, import os import sys sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python')) import grass.script as g import ...
0
votes
0answers
20 views

saga_api python library : raise AttributeError(“No constructor defined”)

Good morning, I'm traying to execute a python script using saga_api library, unfortunately I'm stoped in the first step :(. when I tray to execute this command on python: ...
3
votes
1answer
216 views

Arcpy Update Cursor (arcpy.da.UpdateCursor()) not saving changes to 'SHAPE@LENGTH'

Looked around and found other Cursor questions, but nothing dealing with updating 'SHAPE@LENGTH'. I am running ArcGIS 10.2.1 and have a multipoint shapefile that I am grouping into polygons based on a ...
0
votes
1answer
344 views

How to save results of postgresql to csv/excel file using psycopg2?

I use driving_distance in postgresql to find distances between all nodes, and here's my python script in pyscripter, import sys #set up psycopg2 environment import psycopg2 #driving_distance module ...
0
votes
1answer
61 views

GRASS module g.copy returns irrational outputs

I took this as reference, Moving raster to different mapset GRASS GIS, and I use pyscripter to use GRASS module g.copy from outside, import os import sys #set up GRASS environment variables ...
0
votes
1answer
122 views

Use psycopg2 to do loop in postgresql

I use postgresql 8.4 to route a river network, and I want to use psycopg2 to loop through all data points in my river network. #set up python and postgresql connection import psycopg2 query = """ ...
1
vote
1answer
176 views

How to execute sql lines in postgresql using python?

I use postgresql 8.4 to route a river network, the following is my code typed in pgAdmin and the result is fine, select * from driving_distance ('select gid as id, start_id::int4 as source, ...
0
votes
0answers
53 views

GRASS module g.mapset can't create new mapsets from outside

I use pyscripter to control GRASS from outside. I want to create a new mapset named water. Here's my script to generate new mapset, import os import sys #set up GRASS environment variables ...
1
vote
0answers
46 views

Error in cliping raster with multifeature polygon shape with arcgis9.3 using python

I have raster and I have a multifeatured polygonshape file. I Need to Clip my raster Image. Python code was developed for arcgis 9.3. It was working before and suddenly it stoped working. my codes is: ...
1
vote
1answer
40 views

Extract information of a raster overlayed on another raster with a lower resolution directly in python

I have two aligned rasters with the same extent, one has a resolution of 5 meters and the other of 125 meters. I would like to place the 5 meter one over the 125 meter one and assign to these smaller ...
0
votes
0answers
40 views

Python Error in recognising ENVI file

I am trying to read a .bip AVIRIS file using GDAL in Python. here is the code: from osgeo import gdal from osgeo import ogr from osgeo import osr from osgeo import gdal_array from osgeo.gdalconst ...
1
vote
2answers
151 views

Why my python script of r.watershed has no output?

I type those code in pyscripter, import os import sys #set up GRASS environment variables sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python')) import grass.script as g import ...
0
votes
1answer
33 views

Better ways to check if GRASS r.water.outlet works out fine output

I use my python script to call GRASS module r.water.outlet from outside, and here's my script(I perform this script in pyscripter): import os import sys #set up GRASS environment variables ...
0
votes
1answer
24 views

How to map factors and their relative importance in ArcGIS 10.1 for Desktop?

I want to know how I can calculate a map from a set of factors (in the form of raster layers) and Their relative importance for example: slope 20% lithology 10% . . .