A version of the Python programming language

learn more… | top users | synonyms (1)

3
votes
1answer
20 views

Accept multiple input types in ArcGIS Script Tools UI

everyone! I'm working on a python script that calculates aggregations of ACS Variables (i.e. adding "Renters who spend more than 30% of Annual Income on Rent", "...40%...", "...50%...", etc.). The ...
0
votes
0answers
6 views

Adding a Property (attribute) to a geometry in Shapely/Fiona

Once you have line and polygon geometries, intersection using Shapely is very straight forward. What I did after that is to integrate all the looped 'intersected' geometries into a MultiLineString. ...
-1
votes
0answers
24 views

ArcGIS “Points to Line” tool. ImportError: DLL load failed: module not found

I am trying to run the Points to Line tool in ArcGIS 10.2, but the script fails when it's unable to find a particular python module. I have no idea how I can find which DLL is failing and what I then ...
3
votes
2answers
101 views

How I can reverse numbers in a string without reversing any text? [closed]

I have a string, I need to reverse just the numbers in the string without the text: String: [321 test] The result will be: [123 test]
1
vote
0answers
36 views

Python coding problem - unicode string passed from dictionary to AddField

I tried all possible hints but I´m still stuck. I want to write a script that can be executed from a toolbox in ArcMap/ArcCatalog. It should rename fields (build lists with old fieldnames, new ...
0
votes
0answers
8 views

How to solve OD Cost Matrix (SOAP) by Python

I have published a NetworkAnalyst service to solve OD Cost Matrix on my local machine. I want to send origins and destination through python script which hits the service via SOAP and bring the result ...
1
vote
1answer
20 views

A question about pexif info updated

I tried to use pexif to update my photo EXIF with following the work on StackExchange (How to save geodatabase attachments to disk with updated exif data). However, I got the below error message when ...
2
votes
1answer
70 views

Clipping Line shapefiles within extent of Polygon shape?

My question is an extension of Vertical lines in a polygon shapefile. Kindly refer to that question first. What you shall see there is a method of generating vertical lines with respect to the ...
0
votes
1answer
41 views

Passing options to ogr2ogr using python subprocess.Popen

I'm trying to programatically import some shpefiles to postgis, since I need to catch the exit code of the process I decided to use subprocess.Popen. I've managed to import the files using: cmd = ...
1
vote
2answers
67 views

Vertical lines in a polygon shapefile

I am working with a GIS problem using a single input of a polygon shapefile. Consider an irregular polygon. I want to draw vertical lines across the extent of the polygon at equal spacing. How I ...
1
vote
1answer
30 views

Rotating geometry to specific angle using pyqgis?

I do not know how to rotate a geometry using pyqgis. Is there any sample/example code available to show me how?
1
vote
0answers
42 views

Splitting lines once at specified distance from each end?

This is related to an old problem of mine, regarding arrowheads on lines, which doesn't look very nice unless the line is very thin. It's even an ArcGIS idea with quite a lot of votes (although no ...
1
vote
1answer
31 views

Clip layers in a dataframe with a polygon in python?

I'm trying to clip layers in a dataframe with a polygon using python and I've done this python script but it's giving this error:"ERROR 000840: The value is not a Feature Layer" Thanks for any help. ...
1
vote
2answers
40 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
111 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
46 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
57 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
1answer
70 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
44 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
52 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
8 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
68 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
37 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
34 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
21 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
39 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
54 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
82 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
43 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
91 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
55 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
76 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
84 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
25 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
49 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 ...
3
votes
1answer
89 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
75 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
1answer
47 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
99 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
116 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
25 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
93 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
31 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
318 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
96 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
54 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
150 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
110 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
17 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 ...