A version of the Python programming language

learn more… | top users | synonyms

-2
votes
0answers
31 views

Data fusion python code or toolbox [on hold]

I want to synthesis several data layers for finding a probability map. In creating it, i need use this operations in arcgis. Please help me about doing this operations with ArcGIS. How can I do it? ...
1
vote
2answers
32 views

Run FME Script in batch file using .NET

Encountered another roadblock. I have a working FME script that I want to automatically run using a console app. I created a simple batch file which accepts a MDB file path as parameter: fme.exe ...
2
votes
2answers
75 views

Python Window Crash and import arcpy issue

Trying to do anything in the Python shell within ArcGIS 10.2 and it just crashes once I hit enter after writing code, no matter what I do. I've tried to uninstall, deauthorize, reinstall, ...
2
votes
1answer
38 views

How to SUM field, insert SUM into new field based on FIELD

This is a continuation of my previous question in an effort to build upon it. How to SUM field and then insert into NULL column? Given the examples of my data below, I would like to be able to ...
1
vote
1answer
32 views

Import shapefile is not working in pyshp?

I am just trying to use "pyshp" package to open shapefile in Python and use the Attribute data for further development. Firstly I have downloaded pyshp package for python 2.7 and installed it in my ...
0
votes
0answers
29 views

GeoAlchemy: AttributeError: type object 'ColumnProperty' has no attribute 'ColumnComparator'

I installed GeoAlchemy using easy_install but when trying to import it returns the following: Traceback (most recent call last): File "", line 1, in import geoalchemy File ...
1
vote
0answers
28 views

Rendering points and polygons with Mapnik

I've tried to render a few maps in Mapnik and I have a little problem. I want to render a map that contains two layers: point and polygon. I've used this script: import mapnik rule = mapnik.Rule() ...
1
vote
1answer
30 views

How I get dbflib module for python27

I'm trying to use a script by python to download MODIS imagery. I follow this script: http://pyevolve.sourceforge.net/wordpress/wp-content/uploads/2009/02/modis.py. I installed: ...
3
votes
1answer
42 views

raster landuse calculation

I want to calculate the counts of each landuse type based on the unique landuse code from each raster datasets. Raster dataset consists of six major landuse and their unique codes are below: 1) ...
0
votes
0answers
6 views

Pyqgis 2.2 : get signal on feature added : error message

For my pyqgis plugin 2.2, I try to: def logFeatureAdded(self,layerId,addfeatures): message = str(layerId) + " has features added: " for feature in addedFeatures: message += str( ...
1
vote
2answers
50 views

Pyqgis 2.2 : zoom to layer extent?

Regarding my plugin pyqgis 2.2, i can load a vector layer succesfully. But when i try to zoom to the layer extent it does not work. How to do in order to zoom to the layer extent? Thank you very ...
0
votes
0answers
32 views

Get signal on edited feature?

Regarding my pyqgis plugin 2.2 , I've implemented signal on a vector layer event successfully. For instance, whenever i create a new feature, i can read a new basic message appeared via QGIS logging ...
0
votes
0answers
25 views

Read esri shape point data and spline interpolation using python shell scripts?

I am quite new in python scripting. I am a dedicated user of arcgis but this time I have to work without arcgis. I have a point shapefile with 10 different attribute fields of different peat layer ...
0
votes
0answers
15 views

Pyqgis :2.2 : link between a signal and an event

I'm writing a pyqgis 2.2 plugin with qgis 2.2 I succeeded in accessing and displaying vector data (geometries & attributes). I succeed also to create a 'beforecomitechanges' signal ( emitted, ...
1
vote
1answer
38 views

raster to polygon conversion

I 'm trying to automate the conversion of raster to polygon and the rasters files are in "TIF" format which is a "unsigned integer". I have the code below. However, I 'm getting an error while ...
0
votes
1answer
50 views

Type Error with ArcPy Update Cursor

filter = 'LinkID IS NOT NULL' cur1 = arcpy.UpdateCursor("ODDS_Links", filter) high_id = 0 for row1 in cur1: if high_id < row1.LinkID: high_id = row1.LinkID filter2 = 'LinkID IS NULL' cur2 ...
3
votes
1answer
70 views

Conditional formatting for Advanced Label Expression in ArcMap

I am trying to do some conditional formatting in order to highlight specific criteria. The main error I keep getting is that there are no features found. I've done a simple label with the exact same ...
0
votes
1answer
38 views

Creating multiple folders named by a list in python [closed]

I am trying to make a python code to create folders named by a list of int and strings, the code below is returning an error, it works when the list is made of strings only, can anybody help ? ...
2
votes
3answers
82 views

How do I insert the string field and calculate it in Python?

Hello I am trying to insert a code that force a column Sum_Acres_ to add a comma to display like this 300,000 from 300000.456 Here is my sample I wrote from a ModelBuilder and export it to python. ...
1
vote
1answer
50 views

sum count column in raster attribute

I am a beginner to python coding in GIS. I want to calculate the total number of counts in raster attribute table. In order to do that: I would like to build a attribute table of raster data use a ...
1
vote
1answer
45 views

ArcObjects SQL Server Connection not recognizing instance

I am trying to make a connection to a SQL Server database with SdeWorkspaceFactory. This is from my Windows 7 x64 Desktop to a Network database. If I use this: SDEWorkspace = ...
1
vote
1answer
64 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
24 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
38 views

Python Hyperlinking Script in Arcmap 10.2 [closed]

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
1answer
81 views

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 ...
1
vote
0answers
56 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
36 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
70 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
90 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
19 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
51 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
27 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
202 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
77 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
45 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
117 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
79 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
15 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
51 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
26 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
287 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
34 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
62 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
109 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
64 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
20 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
48 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
86 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
51 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
57 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 ...