A version of the Python programming language
1
vote
3answers
68 views
Append Attribute Table of multiple feature class with same points/ pointID
I used extract by points function to extract values from multiple rasters using a point feature class. The output is a couple hundred point feature classes with values associated with those rasters.
...
0
votes
0answers
26 views
Missing pyexpat on QGIS 2.0.1: pyuic4 fails
I have encountered a problem when trying to develop a custom plugin for QGIS 2.0.1 (Python 2.7.5 with two additional Python installations on the same machine). When I try to compile the UI file ...
2
votes
2answers
78 views
Automatically download Modis image using python script
I need download Modis imagery automatically from the website: https://earthdata.nasa.gov/.
I found this link: http://gis-techniques.blogspot.com/2010/06/getting-modis-image-automatically-from.html
...
3
votes
1answer
56 views
Can folder connection in ArcMap Catalog window be added using python?
I have created a set of general scripting tools for map automation etc. in one of my tools a geodatabase is created in the workspace folder the script points to. Just out of curiosity is there any way ...
4
votes
1answer
94 views
Issue on using Pyscripter with ArcGIS 10.2
Can someone please let me know how I can set the Pyscripter 2.5.3.0 x64 works with Python 2.7.3 which comes with ArcGIS?
what I did was:
1- I installed the ArcGIS 10.2
2- I installed Pyscripter ...
0
votes
1answer
46 views
Copying Network Analysis Layer - Service Area Polygon in Python Script
I have built a geoprocessing tool using arcpy modules in python. Screenshot shown below:
In this tool I am creating Service Area Polygons and selecting census boundaries within those Service Area ...
1
vote
1answer
59 views
How to Project a point on feature in PyQgis?
In Arcgis IProximityOperator.QueryNearestPoint Method was available to get the nearest point. Similarly Is there any function available in pyQgis?
Thanks in Advance.
3
votes
1answer
70 views
Using update cursor in a while loop to perform analysis on individual polygons gets stuck on first row
I am working through an open courseware project from PSU found at https://www.e-education.psu.edu/geog485/node/145
I am trying to use an update cursor in a while loop to perform an analysis on ...
3
votes
0answers
49 views
How can I create a form so the user has to be authenticated to access a project?
I have a login form in QGIS and when it is loaded, python gives me an error for, apparently, not recognizing the findchild part. This is due to the fact that the form isn't loaded before the script is ...
1
vote
1answer
39 views
3D roof polygon creation from polylines in ARCGIS 10.1
I am Working in arcgis 10.1,I would like to create roof polygons from lines, the lines are captured with photogrammetry technique.
As per my requirement I have found tool "3D Building Generator ...
1
vote
0answers
64 views
Why do I get different results running a script in PyWin and loading it to the Python shell in ArcGIS? [closed]
I've been trying to teach myself Python scripting for ArcGIS and have gotten frustrated on multiple occasions when I try to debug my script endlessly, only to later find out that it actually works ...
0
votes
2answers
28 views
How to use coding for auto-comparing two different fields in ArcGIS for Desktop?
I want to compare two group fields in attribute table, which are related to the name of villages.
The name of these villages (in both field) are the same but they have in some cases differentiation ...
1
vote
0answers
42 views
Why does Describe function fail on annotation layer with RuntimeError: Object: Describe input value is not valid type?
I am accessing layers in an mxd programatically and also accessing the layer properties using the Describe function
lyr =arcpy.mapping.ListLayers(mxd) # gets me the list of layers in mxd
desc= ...
3
votes
0answers
59 views
Why does ArcGIS 10.1 Upgrade Geodatabase tool throw ERROR 999999: Error executing function?
I am trying to upgrade File Geodatabases using a Python script that runs fine until the step where it runs the Upgrade Geodatabase tool. The error is:
"ERROR 999999: Error executing ...
2
votes
1answer
35 views
ArcGIS 10.1 Upgrade Geodatabase Check Version
Hi I am trying to check the version of filegeodatabase before upgrading to 10.1, I have a list of file geodatabases and some of them are already in 10.1. Can anyone suggest me how to update only those ...
2
votes
1answer
78 views
Python getting area of multipart features with SearchCursor()
I am tasked with programatically getting the area of each individual part of a multi-part feature. I have a script already to read each individual part and print its XY coordinates and it works fine ...
0
votes
1answer
50 views
populating one field value based on another field value
I have a feature class in a personal geodatabase with 2 fields. They both have domains set up to ease the editing process for my users. If my WaterType field is set as "Not Irrigated" (or code 4) then ...
1
vote
1answer
75 views
pyQgis in stand alone script, vector loading error
I am trying to use the Qgis functions in a stand alone Python script. I m running Mountain Lion OS, 2.7 Python & the Qgis 2.0.1 Dufour.
My main problem is that I cannot get started - I cannot ...
0
votes
1answer
65 views
GDAL command lines on windows [duplicate]
I am trying to get started with GDAL on a windows machine using Python2.7.
I have tried commands such as:
gdalinfo RasterFileName.TIF and gdal_translate.py -projwin ulx uly lrx lry -of GTiff ...
0
votes
1answer
48 views
Fiona: won't install in Debian7.x-64bits/Python2.7
I need to install Fiona in my Debian7.x-64bits/Python2.7 machine. I already installed GDAL/OGR, pip, virtualenv, and six. I am using Python 2.7 so argparse is also installed. The installation protocol ...
-2
votes
1answer
49 views
“Open Source Routing Machine” querying and parsing
What I have in Python:
import requests
url_osrm = 'http://router.project-osrm.org/viaroute?loc=50.12345,8.12345&loc=50.23456,8.23456'
print url_osrm
proxies = {"http": "http://YOUR-PROXY:8080"}
...
0
votes
0answers
52 views
SOLVED: “Open Source Routing Machine” works with browser but not with Python
What I have in Python:
import requests
url_osrm = 'http://router.project-osrm.org/viaroute?loc=50.12345,8.12345&loc=50.23456,8.23456'
print url_osrm
osrm = requests.get(url_osrm)
# print ...
2
votes
1answer
38 views
How to determine if a raster has rowattributes?
I have a raster file which is the result of extract by mask geoprocessing tool. If it has no rows then I take it as no overlap between input raster and shapefile. Following is the way I am reading it ...
4
votes
1answer
58 views
ArcGIS 10.1 Anyway to make a script tool run immediatly upon opening
I have a script tool that creates an ArcSDE connection folder and copies data from the server to a new folder on the users computer. The tool has no parameters runs fine but when you open the tool it ...
3
votes
1answer
131 views
ArcGIS 10.1 Python Script tool wont read string variable in SQL statement [duplicate]
I am working on a simple script tool that selects features from a .shp and creates a new output with only those features. Basically the user specifies(from a drop down list) the county and the ...
1
vote
0answers
37 views
How to find out which layer had a Selection made on it? [duplicate]
If the user makes a select using arcpy.SelectByAttribute() or arcpy.SelectByLocation() how do you find out which layer they made the select so you can use arcpy.SearchCursor(layer)?
0
votes
1answer
33 views
Is there an event handler for a Selection being made using ArcPy?
I want to be able to capture an arcpy.SelectByAttribute() or arcpy.SelectByLocation() event being triggered. There doesn't seem to be an extension that is able to handle this. Is there a way to do ...
0
votes
0answers
23 views
ImportError: No module named arcpy - ArcGIS 10.1 and Python 2.7 [duplicate]
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 326, in RunScript
exec codeObject in __main__.__dict_
File ...
1
vote
2answers
115 views
How do you get all the results from a Selection made by Attribute or Location using ArcPy?
Using arcpy I'm trying to get the results of a selection, or what is currently selected as a list.
Basically I'm attempting to build an addin which on click will either perform an operation where I ...
1
vote
1answer
74 views
How to retrieve the year from a date format?
I'm attempting to retrieve the year from the following date format: 1/1/1988
I've tried the following but it does not work str(1/1/1988)[4:] and I've also tried str(1//1//1988)[4:]
2
votes
1answer
19 views
Listing datasets doesn't bring back the correct result
If I do a ListDatasets() in python, then I don't get the correct result in the list except for datasets belong to other schema owners, so why can I still see the datasets in ArcCatalog.
The code is ...
1
vote
1answer
95 views
Find Direction/Location of point in polygon using Python ArcGIS10.1
I have a point located inside a polygon, I want to determine its location or direction i.e. if it is in the northwest corner or southwest. I have the x,y of the point. Any idea on how to do this? I ...
0
votes
0answers
145 views
ERROR 001269 : Compressing the service definition failed.ArcGIS 10.1,Python 2.7
I am trying to publish an mxd using python script. I invoke this pyhton script from c# application, after creating the sddraft file, the system throws up this error "001269 : Compressing the service ...
1
vote
2answers
80 views
How can I define the layer CRS for a memory layer in pyqgis
how can I define the CRS for a memory layer from the qgis project settings
vpoi = QgsVectorLayer("Point", "vectpoi", "memory")
feature = QgsFeature()
...
1
vote
0answers
45 views
How do I make vectorlayer with sql on PostGis via python code
I need to make a vectorLayer and fill with the SQL's results on PostGIS via python code.
I'm working with python 2.7, QGIS 1.8 and PyQt 4.5
How do I it ?
thanks
0
votes
1answer
29 views
How to make a vectorlayer through of sentence SQL on PostGRES
How do I create a vectorlayer to through SQL on PostGiS on Python 2.7. I is working with QGIS 1.8 and I needed create a vectorLayer through SQL on PostGIS.
0
votes
0answers
385 views
QGIS Plugins - DLL load failed: %1 is not a valid Win32 application
This is my first question so please go easy.
I am trying to develop a Plugin for QGIS. I made my plugin using the "plugin builder", then compiled the .qrc and .ui files with PySide-rcc.exe and ...
0
votes
1answer
205 views
QGIS python - reference a layer in the table of contents
I'm trying to create a plugin for QGIS using python, But need some help. I want to 1.Zoom to a layer and 2. make the layer visible(switch off or on).
But I have managed to zoom to an active layer by ...
1
vote
0answers
40 views
Insert last coordinates from a list of coordinates with line ID into a multipart polyline feature class
I'm having problems creating the last line from a list of coordinates that I have. I have a text file with coordinate data with a X, Y, and a Line ID (LID). I read the file and inserted each ...
3
votes
2answers
158 views
How to control state of buttons in Python Add-In?
I have bunch of buttons to perform separate tasks within a Python Add-In. Buttons are greyed out and required to be enabled after initial tools run. In the following example, tool1 is turned off after ...
4
votes
1answer
224 views
Gdal Python Bindings and File Geodatabase API
I'm trying to get python 2.7 to work with GDAL/OGR and an ESRI file geodatabase. There have been a few similar questions asked but the answers don't fully resolve my situation.
I have installed the ...
1
vote
1answer
60 views
How to update attributes of a shapefile using list values?
I am using an update cursor to update the attributes of a shapefile using values from a list. It seems very easy, but I couldn't make it run correctly. When I run the following code, it updates all ...
3
votes
0answers
70 views
Why are my raster mean and standard deviation -1?
I have a set of about 25 rasters whose descriptive statistics I have been examining. The data in the rasters were calculated in Python and the rasters were created using Python-GDAL.
In all but one ...
1
vote
0answers
80 views
Spatial Filter in Qgis Using Python
Is it possible to create buffer and get intersected features in Qgis using Python?
I did in ArcObjects.but i need the same in QGIS also.
Dim topo As ITopologicalOperator
topo = chkPoint
Dim sFc As ...
0
votes
0answers
25 views
How to create an array of points in ArcMap? [duplicate]
I have a master point in following projection system:
WGS_1984_UTM_Zone_45N
WKID: 32645 Authority: EPSG
Projection: Transverse_Mercator
False_Easting: 500000.0
False_Northing: 0.0
Central_Meridian: ...
1
vote
0answers
42 views
Convert List by Source to List by drawing order using arcpy
When I do some calculations, it results in adding a table to TOC which converts "List by drawing order" to "List by Source". I want to convert it back to "List by drawing order" using arcpy and I am ...
0
votes
1answer
141 views
Getting error in compiling make file for plugin build in qgis 1.8
I am using QGIS 1.8 for building plugin. For developing i am using following ref this link example. where in this step 6 where compile the makefile in OSGeo4W. gives error pyuic4:command not found. I ...
0
votes
2answers
107 views
Why is Shapely not installing correctly?
I am trying to run Shapely on a new machine, and tried both installing it from source, using the installer on its webpage, and using pip install shapely. Every reference I try to make from the library ...
1
vote
1answer
86 views
Export ArcGIS Model to Python - Iterate Rasters, Collect Values, Calculate Values
I want to batch process a large number of raster files, calculate some values and properties and export these to a .csv or .xls. I managed to get a good working model that does this perfectly.
...
1
vote
3answers
177 views
How to setup a debugger for QGIS Plugin development?
As the title of the question implies, I wish to know how to set up a QGIS Python Plugin Debugger so that I can develop plugins more efficiently.
Any information regarding this would be much ...