Python is an open source interpreted programming language used in many GIS programs.

learn more… | top users | synonyms

1
vote
1answer
42 views

Populating list widget in IntraMaps Roam?

How do I add values (items) in a list widget in IntraMaps Roam (2.3.1 release)? I'm trying to add values (items) to a list widget in a form with Python code (ver. 3.3.2) I have created the form and ...
4
votes
2answers
1k views

Setting the extent for a QGIS map using python

I am writing a stand-alone application in Python/QGIS that simply creates maps. I want to load vector/raster layers, set symbology, set extent At the moment, that is all! Currently I am just using ...
1
vote
1answer
173 views

Using GDAL to read dted files

How do I get the elevation at a certain point using gdal to read in a dted file? I don't see much useful information out on the web. I'm sorry I should have been more specific. How would I ...
0
votes
1answer
103 views

40k+ points from Shapefile, clustering them and populating on Google Maps/Webapp

I just started a new Python/Django webapp job related to GIS (and i'm totally new to GIS). Here is my task and what i have found so far, and i am stuck as to finding out what's the best way or the ...
1
vote
3answers
42 views

Raster calculator to create single raster with 4 values from two binary rasters

I have two binary rasters showing habitat suitability (0 = unsuitable, 1 = suitable) under current and future climate scenarios. I am trying to create a raster showing: 0 = cells that are not ...
1
vote
0answers
29 views

Difficulty with python package mgrs by Howard Butler

I am developing an app in python and I am trying to import Howard Butler's mgrs package. I am using setuptools to install the package. It does not find the setuptools library module. I have tried ...
1
vote
2answers
125 views

How to plot Storm Prediction Center (SPC) Shapefile using python

I am trying to make a plot of the SPC's thunderstorm outlook using Python. I have downloaded the shapefile from this website http://www.spc.noaa.gov/products/outlook/day1otlk.html. Then I use this ...
1
vote
1answer
55 views

Load the raster image which is in TIF format using QGIS API

I am quite new inthe field of GIS. I am interested in is to load the raster image which is in TIF format using QGIS API I have followed the steps given the in the follwing link to load shape file ...
1
vote
1answer
32 views

How to reduce area boundaries resolution?

I managed to plot zip codes boundaries for an entire US state using ArcGIS data and python tools such as arcpy and Bokeh. The result: The dataset has high resolution area boundaries so, I have like ...
0
votes
1answer
26 views

equation solving by using python or model builder in arcmap 9.3

I want to solve one formula in arcmap 9.3 by using Python or Model builder. I have one shape file, in that there is in attribute table for field A & B Solve the formula: A*B/Sum(A). where Sum(A) ...
0
votes
0answers
29 views

Batch Georeferencing in arcGIS 10.1.2 [duplicate]

I work for a government utility company. Our maps are broken down into 500x500 square meter grids. We have scanned images (TIFF) of these maps that we need to overlay and digize. The maps and the ...
2
votes
1answer
37 views

conditional python script to delete records

I am new to python programming. I am wondering if someone could tell me how to write a python script that would find all records in an attribute table that have identical values in one field, then ...
1
vote
1answer
23 views

Couldn't load plugin PRISM due an error when calling its classFactory() method in QGIS1.8 inWin8

When I load a plugin in QGIS ,met some problems : I had tried copy other Python27's files to QGIS's Python 27 file but it still does't work. Couldn't load plugin PRISM due an error when calling ...
1
vote
2answers
508 views

Using reader Feature Type Name as Writer Feature Type Name in FME

I've search and searched for a way to do this, but no method seems to work. Basically I want to use the input feature class name (feature type in FME) as the output name. This normally works, ...
4
votes
2answers
64 views

How to convert float raster to vector with python GDAL

I have float raster and now I want to convert it to vector. How is it possible with python gdal library? I have tried with gdal_polygonize.py of gdal utilities in command line and it worked excellent. ...
1
vote
0answers
24 views

Trilateration using 3 x,y points and 3 distances, all in cm [closed]

I want to find out the position (x,y) of a given point, knowing the distance from 3 x,y points. Below you can view the x,y coordinates and their given distances in cm. B1x = 795 B1y = 332 B1d = ...
1
vote
3answers
706 views

More Efficient Spatial join in Python without QGIS, ArcGIS, PostGIS, etc

I'm attempting to do a spatial join much like the example here: Is there a python option to "join attributes by location"?. However, that approach seems really inefficient / slow. Even ...
0
votes
0answers
14 views

Adding features to rtree using multiple generators

I am using the Python Rtree library http://toblerity.org/rtree/ I know you can supply a generator function to the Index/Rtree constructor to insert features. How can I add features to an existing ...
4
votes
3answers
2k views

How can I specify the CRS of a raster layer in pyqgis?

I manipulating netcdf raster data from the QGIS python console. The metadata of my netcdf file does not provide the Reference system. However I know it is 'EPSG:4326' I am writing a python script to ...
0
votes
0answers
16 views

Loading Oracle Spatial Layers in standalone python qgis

I used below script to connect to postgres and load layers successfully.I want to aceive this using Oracle Spatial for both vector and raster loading.How can I achieve that?In other words what is the ...
1
vote
1answer
39 views

Write GeoJson into a .geojson file with Python

I want to write a geosjon object with the type <class 'geojson.feature.Feature'> into a .geosjon file. Therefore I tried to use with open(test.geosjon, 'w') as outfile: ...
1
vote
2answers
25 views

How can I disable logs being created in standalone python script?

When I run the following script in QGIS 2.6.1, it produces a folder called 'processing', which contains a log, in the directory it reads files from. And since the script reads files from several ...
2
votes
2answers
105 views

Delete Files in a folder and disregard an existing folder

I did a lot of geoprocessing steps and now I like to delete all files including result, result, _join, _interand reclass in their name. I can do this with the following import glob import os for fl ...
0
votes
1answer
30 views

Add multiple GDB files in subdirectories to mxd using python

I have GDB files located in many sub-Folders and sub-sub-Folders. All Sub Folders are located in one large directory i asked it for layer file in Add multiple Layer files in subdirectories to mxd ...
5
votes
6answers
452 views

How to divide a feature class into ranges?

I have a shapefile consisting of around 4000 polygons. The polygons are created from buffering around a similar number of islands somewhere in the Norwegian archipelago. Due to an error in the ...
2
votes
2answers
241 views

Python problem visualization .tif image

I am trying to read a hyperspectral image in Uint16 .tif format and visualize it. I use GDAL in Python to read the data and everything works perfectly when I use matplotlib to show one band of the ...
3
votes
0answers
45 views

Lining attributes up with features when creating shapefile using PyShp?

I used the Python Module Pyshp to select particular census blocks from the Census's shapefiles and package these into a single shapefile. However when I add this data into ArcMap and right click to ...
1
vote
1answer
20 views

Debugging ArcPy ImportToolBox AttributeError: Object: Tool or environment <ConcatenateRowValues_AA> not found?

First post here. I am trying to use the ConcatenateRowValues tool provided by ESRI. My overall code for my script is working fine except when it tries to use the ConcantenateRowValues Tool. I start ...
11
votes
3answers
3k views

Exporting arcgis features with attachments, for outside ArcGIS

Arcgis 10 features the new ability to add attachments to individual features to feature classes stored in a geodatabase. One use of this would be to add multiple pictures to a specific location, fire ...
0
votes
2answers
34 views

Python column checker-comparing 2 fields

One problem I am having is the following: I want to create an automatic program to see how well the automozation has been with comparing the results of 2 columns to each other in the same column. In ...
3
votes
1answer
36 views

How to add a column/feature with PyQGIS 2.x?

I'm using PyQgis 2.2 and I'm creating a plugin. I want to add one feature/column to a shapefile. But I get error.. I've tried to do this as it's shown in Cookbook: if caps & ...
0
votes
0answers
29 views

Python scripting error (merge)

I've been trying to use this code to add a field to, merge, and sort multiple feature classes: import arcpy, os arcpy.env.workspace = r'W:\S&P\s&p ...
2
votes
1answer
48 views

How to get shapefile extent from standalone script?

I am trying to obtain the extent of a polygon in a shapefile. I am running a standalone script which will create a grid based on the extent of the polygon. I have tried 2 methods: one from the ...
2
votes
2answers
176 views

Save a layer for each unique value using Python in QGIS

I have a map, in which each region is defined as an attribute of the map (I can select each region from the attribute table). I am trying to create new layers each one containing only 1 region using ...
0
votes
1answer
30 views

Merging multiple feature classes into one using Python

So I have feature classes from an ArcGIS database that I renamed using this Python code: But now I have to merge all the feature classes that are output from this into one feature class named ...
1
vote
2answers
62 views

Add multiple Layer files in subdirectories to mxd using python

I have more than 300 layer files located in many sub-Folders and sub-sub-Folders. All Sub Folders are located in one large directory.I read Use python to add layers to TOC and I try, with arcpy, to ...
3
votes
0answers
14 views

Error writing buffered memory layer to shapefile in QGIS

I have created a memory polygon layerin my QGIS plugin. Then I added a buffer based on a point. I can see the ploygon layer in the map canvas and I can save it to a shapefile from the main GUI. But ...
0
votes
0answers
52 views

Does a road connect one grid cell to an adjacent grid cell?

So here is the problem I am working on. I have an OpenStreetMap roadmap which I overlaid with a 2-D cartesian grid. So for a given grid square, I want to find out if a road segment continues from the ...
0
votes
0answers
31 views

qgis python error mac yosemite

This problem started when I installed GRASS. I changed one environment variable and then I tried fixing, then I uninstalled egis, grass gdal, then I upgraded to Yosemite, and I still have the ...
1
vote
1answer
173 views

Auto increment a new column using Model Builder Field Calculator in QGIS?

I am making a model which requires creating a grid and clipping various layers to it. Using the Create grid function does not provide an ID column, instead it creates 2 columns: "longitude" and ...
2
votes
1answer
49 views

Python library for geometrical calculations using with GRASS GIS?

I have to do some geometrical calculations in 2D(point, lines, line segments and intersection points) in Python, and then use it in GRASS GIS. What is the best library to use for it? I'm trying with ...
1
vote
4answers
165 views

Python Script to Add Fields to Feature Classes

I have to try to add a field called 'Name' to a bunch of different feature classes using python, and then access the name of the feature class to fill in the field. I have no idea how to even start ...
2
votes
4answers
2k views

Formula to Check Latitude & Longitude is within Area without Google Maps Api

I got this Example Map SampleMap: http://techinfo.co.id/test/map.php I make Boundary Polygon shape , -6.875165174925262, 107.56293296813965 -6.882663904407988, 107.66730308532715 ...
1
vote
1answer
45 views

Algorithm to determinate neighbor's position (N S E W) of parcels?

After my first publicaation Determinate Parcel Neighbors using PYTHON Where i was looking for a faster way to calculate parcel neighbors and position, and after succeeding that, but the result was not ...
5
votes
3answers
1k views

How do I get the path of a project, or layer file in PyQGIS?

I am generating new raster files from vector layers on a project. I would like to save them in the same directory as the project or layer files. How do I find this path using PyQGIS?
0
votes
4answers
72 views

arcpy interate row, in a python script? SQL Select expression not working

I am creating a python script where I am trying to iterate over point feature class. I want to create seperate Feature classes from each individual day. So select daynumber and then export it to a new ...
3
votes
1answer
48 views

Python Geolocation Software to Filter Cities By Population Within a Radius?

What I'm trying to achieve I want to enter a US city/state or zip code value. Then enter a radius (ex: 30 - would stand for 30 miles). Then I enter a minimum population (ex: 100000 - would tell the ...
2
votes
2answers
2k views

How can I fix “ImportError: No module named qgis.core”?

First of all, I'm using Python 2.7.3, QGIS 1.8 (Lisboa) on Windows 7 pro 64 bits. Now let's go to the actual question: I have written some code (Python) that works well within the QGIS built in ...
1
vote
2answers
91 views

Use row as input to other processes in python

I am new to python and need help. Looked for my answer but don't know if I am even using the correct terminology. I have a model in which I iterated through rows and performed a set of processes on ...
1
vote
0answers
11 views

How to set -srcwin with python gdalbinding and driver.createcopy

I am using gdal_translate currently to cut a 60000x60000 geotiff into smaller 1000x1000 geotiff files. This works but it takes about 24 hours(and I have 44 of those big images to compute). Im not ...