Python is an open source interpreted programming language used in many GIS programs.
1
vote
0answers
80 views
python multiprocessing error in QGis (Windows)
I have this error when I try to use Manager() from python multiprocessing library.
(Just start QGIS open Python console and execute the two following lines)
>>> import multiprocessing
...
1
vote
0answers
97 views
Is there any python function to rotate map layers?
Is there any python function allowing a user to rotate map layers in the map canvas. If so, could you please point this out for me?
I want to rotate a map layer, using a factor of rotation in ...
1
vote
0answers
201 views
Why won't this PostGIS query display in QGIS
I am having trouble rendering the following PostGIS query in qgis1.803.
SELECT
s.musym,
st_intersection(s.the_geom,f.the_geom) as geo,
nextval('"soilsplittersequence"'::regclass) as k
From ...
1
vote
0answers
42 views
How to call a method when self.iface.actionSelectRectangle().trigger() is released?
In my QGIS python plugin I use "self.iface.actionSelectRectangle().trigger()" to select features. I also have a button which changes the attributes of the selected features.
Is there a way instead ...
1
vote
0answers
111 views
qgis and embedded ajax (bing map)
I need to load in a docked QWebView this html:
< html >
< body >
< iframe width="100%" height="499" frameborder="0"
scrolling="no" marginheight="0"
marginwidth="0"
...
1
vote
0answers
146 views
Hack to change data source of a layer file in ArcGIS 9.3.1 with python?
I'm looking for a way to change the source of my layer file using python. Actually I want to do this because I need to re-use a XSL template which is defined under the tap HTML popup of the layer ...
1
vote
0answers
77 views
How can I draw an ellipse filling the dataframe with ArcPy?
I need to modify one of my template scripts to draw a circle from the centre of the (inset) data frame to the edge of the data frame. This will then be used to clip the data frame to shape. I'm using ...
1
vote
0answers
377 views
Looping multiple feature classes in python for ArcGIS 10
I currently have a large list of feature datasets and dbf tables in a geodatabase. I would like to join each shapefile with its matching DBF file using the "Make Query Table" tool and then "Copy ...
1
vote
0answers
122 views
Reclassify ESRI raster using variables from a SQL Server table (connecting with pyodbc)
I am trying to reclass a raster file (representing vegetation and land cover types) using values stored in a SQL Server Express table. I have a set of ~400 species records in the table, with each row ...
1
vote
0answers
108 views
produce images with shapefiles and OpenStreetMap
I have a python file http://pastebin.com/jzwE6c6P which iterates over the features of a shapefile and renders a simple image by zooming to the bounding box of each feature. What I need is ...
1
vote
0answers
298 views
Python batch text replace crashes some ArcGIS10 MXD on reopen
In an attempt to teach myself some Python, I am writing a script that will loop through a netwrok directory for all MXDs and when found, replace layout text elements with dynamic text element ...
1
vote
0answers
165 views
Geographic limit to overlay analysis in geoprocessing service
Function:
I've created a geoprocessing service that serves a toolbox containing a custom python tool. This python tool selects a polygon and buffers it by 1 mile. This buffer is then used to ...
1
vote
0answers
70 views
Issues Switching SDE workspaces, same DB, different users
I have an SDE database with a number of user schemas. I'm wanting to connect using different credentials for each and get information about the tables and datasets within.
I'm using arcpy, and have ...
1
vote
0answers
277 views
Variable stored as NoneType in Python with updateCursor
SOLVED: although the field was not nullable (no null values), a glitch created one in the heading field, so the variable was stored as a null value and thus the NoneType.
I am using updateCursor to ...
1
vote
0answers
933 views
Exporting .jpg files from data driven pages in Arcmap
I have generated about 90 maps through data driven pages(ArcGIS 10.0). I now want to export them as .jpg files in either landscape or portrait format.
I tried python but it is not working, it worked ...
1
vote
0answers
273 views
Scipy: Convert RGB TIFF to grayscale TIFF and output it on Matplotlib
I want to manipulate RGB bands in a TIFF file and output the grayscale map on matplotlib. So far I have this code, but I couldn't get it on grayscale:
import scipy as N
import gdal
import sys
import ...
1
vote
0answers
268 views
how to create shape file table from text file in QGis python
I have a text file with all field information how can create new polygon shape file table with the text file..
text file having following content..
NAME LAYER GM_TYPE KML_FOLDER ID PERIMETER ...
1
vote
0answers
447 views
arcpy spatial join input parameter problems
Using ArcGIS 10 SP4 with all extensions...
I have a parent directory (J:\...\spatialjoin) containing two sub-directories of feature classes I want to spatially join.
Directory 1 (target features) ...
1
vote
0answers
86 views
refactoring an XSLT processor with minor changes
having an extremely large xml-file - which is derived from the field of geo informatics. i got it from a German subsite or the OpenStreetMap-Project: the Geograpical-Engineering-site that deilvers a ...
1
vote
0answers
111 views
Polygon symmetry detection
I was wondering if there was any way to create main axis (axis of symmetry) lines for polygons.
I have polygons that represents buildings.
I will want to find main axes (axis of symmetry) for those ...
1
vote
0answers
74 views
Setting border-style to 'no pen' using QgsGraduatedSymbolRendererV2
I am developing a QGIS plugin that, after a series of inputs, will produce a thematic map using the QgsGraduatedSymbolRendererV2. Because the polygon are very small, the boarders make it such that ...
1
vote
0answers
449 views
Python script for running ArcGIS10 Area Solar Radiation tool
I am trying to run the Area Solar Radiation tool using a Python script, because I want to run it on several DEMs at once. I am using a server with Windows 7, ArcGIS 10 and PyScripter.
I am a beginner ...
1
vote
0answers
172 views
ArcGIS 10.0 - How to have GP Service make rest calls instead of Silverlight client?
I have a Silverlight client that densifies a user drawn polyline. The returned vertices from the polyline are then sent to esri elevation sample server for each vertex to find an elevation value. ...
1
vote
0answers
216 views
How do you convert a bounding box into the canvas CRS?
I need to convert the pixel coordinates of a bounding box to the same CRS being used by an existing layer. Here's the relevant code so far:
# First, get the layer-coords version of the bounding box:
...
1
vote
0answers
95 views
Is Django's LayerMapping capable of putting a static value into all features?
I'm using GeoDjango's LayerMapping utility to try and import a set of features. The catch is that aside from the attributes in the source layer, I want all the destination features to have the same ...
1
vote
0answers
277 views
Access Geoprocessing results in Flex Viewer (Enhanced) Search Widget
I have Robert Scheitlin's Enhanced Search Widget up and running successfully with my MapService using ArcGIS Server and Flex Viewer 2.3. I also have a geoprocessing service that returns a point layer ...
1
vote
0answers
47 views
Tiled image transforming to new profile
i have a set of tile which was tiled profile of mercator and proper to tms scheme mechanism.
unfortunately i dont have any tif or georeference table or anything for this. all was tiled with mercator ...
1
vote
0answers
266 views
Administrative level and coordinates from Yahoo GeoPlanet WOEID
The Yahoo GeoPlanet data can be freely downloaded from:
http://developer.yahoo.com/geo/geoplanet/data/.
If I understand it correctly, each WOEID corresponds to a unique location on earth, with ...
1
vote
0answers
102 views
Copied points not intersecting the original points
I'm using an arcpy search cursor to access a Oracle database. I have a simple Python class that I copy the returned row objects into, which gives me more flexiblity than the cursor.
The problem is ...
1
vote
0answers
144 views
arcgis server 10, vb.net, non pooled service, web adf
i am running arcgis server 10. i created a A.MXD file, then started arcgis server and successfully added non-pooled service using A.MXD. i also installed visual web developer 2010 express and created ...
1
vote
0answers
187 views
Validate Python Fme
i have a problem with my script for convert GDB to Excel.
if s=='xls':
reader=FMEReader("GEODATABASE_FILE")
reader.open(param_filename_gdb)
writerXls= FMEWriter("XLS_ADO")
...
1
vote
0answers
244 views
getting the correct location data with user input
I have some code others have provided, which I modified in order to run a Python script in a toolbox in ArcMap which accepts user input for a starting point, distance, and angle to create a shapefile ...
0
votes
0answers
11 views
Anyone recognize this (reference-system related?) pattern of distortion?
I'm new to GIS and was making some progress until getting rather stumped on this one. I've imported some what I believe is lat/lon data from NOAA (SPC severe weather alerts). When I use the ...
0
votes
0answers
20 views
Python OGR, psycopg, postgis - geometry is null when updating
I'm attempting a python script that takes data from a file and updates only the geometry and a key field in a post gis table. But no matter what I try the geometry always seems to be updated null.
...
0
votes
0answers
16 views
GRASS 6.4.3RC3, Python script and windows7
I'm trying to solve my problem for a long time. I hope someone can help me. I'm not expert but I really want to istall 2 add-on on grass 6.4.3RC3 on my win7. The add-ons are r.basin and r.ipso. I ...
0
votes
0answers
21 views
Python errore addons (win)
I have this type of error when I try to use r.ipso:
C:\Program Files (x86)\GRASS GIS
6.4.3RC3\extrabin\python.exe: can't open file 'r.ipso.py':
[Errno 2] No such file or directory
while with r.basin ...
0
votes
0answers
33 views
Python script to create a point WITH attributes values
GIS platform: ArcGIS 10.1
I have coded up a Python script that determines the coordinates of where I need to create a new (calibration)point, but I can't work out how to add it to a feature class ...
0
votes
0answers
48 views
ogr.GetDriverByName('FileGDB') returns None
I installed:
gdal-110-1600-x64-core.msi
GDAL-1.10.0.win-amd64-py2.7.msi
gdal-110-1600-x64-filegdb.msi
from www.gisinternals.com
I can open my gdb on the command line:
C:\data>ogrinfo ...
0
votes
0answers
20 views
Mapnik and Tilecache performance issue
I am working on GIS based web application using Mapnik and Tilecache with backend python. To display map in the browser, openlayers is used. Maps are generated by calling tilecache cgi url. I am ...
0
votes
0answers
29 views
code isn't creating an output file (ogr2ogr w/ python)
I have a python code that clips a shp file w/ a shp file using the gdal/ogr library. It seems to work but it does not create an output file.
import subprocess
# The features used to clip the input ...
0
votes
0answers
52 views
Remove last 5 characters from Feature classes names
I need to remove the last 5 characters from all feature classes in a mssql database by removing the last 5 letters. I have MYSQLServer 2008 R, ArcGIS Server 10.0 Enterprise Standard, Arcsde 9.3 with ...
0
votes
0answers
28 views
SEXTANTE v.to.rast.attribute issue in script
I'm trying to convert a vector layer to a raster by using the GRASS function v.to.rast.attribute in Python.
My code doesn't throw any error but the raster image is only a square of 1px. But when I'm ...
0
votes
0answers
37 views
SEXTANTE runalg and QgsVectorLayer issue
I'm trying to make a script for converting polygons to lines. But I'm having some issues while generating temporary layers.
In this script, I iterate through all the features of the input layer to ...
0
votes
0answers
52 views
How to set point / line / polygon color and transparency with Python?
How can you set the color and transparency of a vector layer feature in QGIS using Python? Seems like a pretty simple and common task but I can't seem to find answered questions or examples.
Any ...
0
votes
0answers
65 views
Create a polygon shapefile using point as boundary
Following have two problems:
I am now have 4 point in a shapefile and I want to set the point's coordinate for boundary of a polygon
The points are xmin, xmax, ymin, ymax that can just be a ...
0
votes
0answers
26 views
Invalid multipolygon resulting from union of valid multipolygons
I'm using python (2.7) and ogr (1.9.2) to merge a bunch of multipolygons together. On their own, all the multipolygons are valid. After I iterate over them using ogr's Union function, I end up with ...
0
votes
0answers
48 views
Dynamically generating data for map tiles from Python function
I'm brand-new to GIS and relatively new to web services. I've found a ton of great resources on the web, but I'm having trouble addressing one specific issue:
One of the data layers on my planned map ...
0
votes
0answers
56 views
Sextante script for statistic info
I want to generate a script for getting statistic information window from selected feature. For example i have two layer building(polygon) and railway(linestring). By using this tools i got a window ...
0
votes
0answers
38 views
Fill up polygons with field value
I have now defined my renderer with a color map
I want to fill it with a value in the end field of my shape file's attribute table with python
how to do it??
I use QGIS 1.8.0 with python 2.7.3
0
votes
0answers
24 views
Receiving Label Expression error
Writing simple label expression in python. It looks like this [Well_Name]+'\r'+ [TCA] . They are both string fields. I receive the following error "TypeError: coercing to Unicode: need string or ...


