0
votes
3answers
77 views

How to Build a graph from a map

I spent days looking in all questions here and trying tutorials. I need to build a graph for a region (It will be my input in simulation) I downloaded Postgresql and Postgis and osm2pgsql. Now i can ...
1
vote
1answer
29 views

Can't get SRS from PostGIS using Proj4 text

I'm having a problem transforming a point from the Australian MGA UTM datum (eg MGA Zone 51 http://spatialreference.org/ref/epsg/28351/) to WGS84 using GeoDjango. I've narrowed that down to a problem ...
4
votes
1answer
96 views

Can I use a QGIS geometry in a Python PostGIS query?

I have a "Python Init function" for the attribute form in QGIS, which is called when I add a new geometry. I can access the geometry of the newly created feature like this geom = feature.geometry() ...
0
votes
1answer
54 views

an efficient way to find the pgrouting edges contained within an isochrone

So I am working with some pgrouting road network data in postgis2.0/postgresql 9.1. I am interested in routing around certain types of disasters like tornados or such. If a disaster event happens at ...
0
votes
1answer
62 views

Import raster into PostGIS using Python

I am trying to import information from a Bathymetric Attributed Grid (BAG) file into PostGIS using Python and psycopg2. I'm working, for now, on a Windows box with pre-compiled packages, so I don't ...
4
votes
1answer
99 views

PostGIS table to network analysis

I use PostGIS 2.0 and Python API (GeoAlchemy) to work with it. I want to convert topological informations (points, lines, faces) from PostGIS tables to topological network (points, lines) to study it ...
1
vote
1answer
97 views

Finding closest Intersection between line strings (PostGIS)

I want to find the distance between one point (excavation sites) and a line (rivers) for the cardinal directions. What I thought would be the easiest way is to draw lines between the excavation site ...
0
votes
0answers
65 views

PyQGIS loading layer style with PostGIS

I'm loading layer styles from .qml files in a Python plugin. I'm about to switch to loading them from a non-local postgreSQL db. I've been looking at the (from QgsVectorLayer (v2.2)) ...
1
vote
1answer
100 views

PostGIS Type Modifier Error

I'm trying to work an example from the "PostGIS Cookbook" and I'm getting an error I don't understand. I'm running the example using Postgres.app on a MacBook. Postgres.app is running PostgreSQL ...
1
vote
2answers
73 views

Suggest an algorithm to measure how a node is connected to road network

I try to measure how well a node is connected to the rest of the network. If a city has a distant suburb connected with one sole road, it's connectedness is, say 1. If it's connected by 2 roads, it's ...
1
vote
1answer
205 views

Import shp to Postgis using Python and ogr

I just export a Postgis Table to shp using this tips but I'm not able to import a shp to Postgis using the same library(ogr). Any idea? Thanks a lot f.
0
votes
0answers
58 views

using postgis function in pyqgis

I'd use Postgis function in Pyqgis script. This code: qsql="(select gid, id, St_Buffer(the_geom,200) as geom from archi)" uri = QgsDataSourceURI() uri.setConnection("ip", "port", "x", "x", "x") ...
1
vote
0answers
73 views

PyQGIS Dialog Plugin not resetting

I have written a PostGIS search plugin that works pretty well, except two things that I just cannot figure out a solution 1) When the dialog closes and then is reopened the previous query is still in ...
3
votes
3answers
559 views

PostGIS: parse geometry wkb with OGR

I'm trying to pull a LineString geometry out of PostGIS and parse it with OGR (python bindinds). from osgeo import ogr import psycopg2 connection = psycopg2.connect("...") cursor = ...
-1
votes
1answer
55 views

plypython set-up

I am trying to set up plypython on the following system: Windows 8.1 PostgreSQL 9.2 64-bit PostGIS 2.0 Python 2.7.05 I have added plpython2.dll to \PostgreSQL\9.2\lib When I run: CREATE ...
2
votes
4answers
316 views

How to turn all lines into one direction?

How can I turn all features of my polyline (postgis and/or shapefile) into one direction - it doesn't matter what direction. I know how to switch the direction of lines but I have no idea how to ...
2
votes
1answer
143 views

Transferring data between spatial databases

I would like transfer spatial data from PostGIS to Oracle Spatial. I want to use Python's modules psycopg2 and cx_oracle. Transfer Oracle > PostGIS is OK, but in opposite version I have problem with a ...
0
votes
2answers
91 views

GeoAlchemy pg_function.geojson cannot be decoded with json.loads

I asked this quesiton over on StackOverflow and thought it might make more sense to post it here given it's GIS nature. Given this function: features being a list of SQLAlchemy objects template ...
2
votes
1answer
150 views

GeoDjango - return SRID of geometry in GeoQuerySet

I'm wondering if there is a function in GeoDjango which would allow me to determine the SRID of a geometry column in a GeoQuerySet. I know I could do it with a raw SQL query (I'm using PostGIS) but I ...
2
votes
2answers
1k views

Loading PostGIS raster layer into QGIS

I am unable to load a PostGIS raster layer into QGIS. I have looked through previous posts Loading raster from PostGIS DB into QGIS and Cannot add the PostGIS raster layer with QGIS but was not able ...
0
votes
0answers
201 views

GeoEncoding Fails : latitude or longitude exceeded limits (-14)

Module Installation fails in OpenERP 6.1: Im using OpenERP 6.1 with CamptoCamp GeoEngine (Without GeoEngine it get installed). Trying to install module throws Error: ERROR openerp_trunk_geoengine ...
4
votes
2answers
322 views

In Python, reading a GDAL raster from memory instead of a file

I'd like to analyze some raster data in Python using NumPy. This data doesn't necessarily exist as a file on the filesystem, it could be the result of a query against PostGIS, or something ...
8
votes
2answers
161 views

Feeder bus service

First of all, a little background. I work for a regional transit agency. We are making a "diagnostic" about our feeder bus service. We'd like to know what proportion of our users could take the bus ...
8
votes
1answer
255 views

Python with GDAL and PostGIS as a replacement of ArcGIS

Few times ago, I worked with daily land surface temperature satellite images of an area with the size of Alaska. I had to process around one thousand images. I downloaded them, mosaiced, projected, ...
1
vote
0answers
225 views

Loop though records in PostGIS (using PL/PYTHON or PGSQL)

I've seen many example of loops, but I can't get that one to work. I work for a regional transit agency and each year, we conduct several surveys. I geocode everything to the house level for internal ...
9
votes
4answers
473 views

How to use PostGIS to handle complex geoprocessing workflows?

Our organization is considering moving our geoprocessing workflow to PostGIS. We are currently using ArcGIS, with a plethora of custom Python tools used in ModelBuilder. We're moving most of our data ...
2
votes
0answers
203 views

3D features (Polyline, Polygon) intersection library

For my research I am looking for a (python) library to get the intersection of some 3D features. The features can be Polygons or Polylines. Mostly I need to intersect a plane with my features and get ...
0
votes
0answers
48 views

QGIS Gazetteer Plugin connection to internal database

A few posts on here mention that the Astun QGIS-Gazetteer-Plugin could be adapted to reference a PostGIS database. Has anyone done this adaptation and could share it? I want to use a gazetteer stored ...
1
vote
1answer
127 views

Can I append to different tables using ogr2ogr?

I have been through many related questions and links but I am still confused as to how/if this is achievable. So, I have defined tables in my postgis database and I would like my ogr2ogr commnand to ...
0
votes
1answer
84 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 what I believe to be lat/lon data based on US FIPS county codes in weather alerts (NOAA SPC). When ...
-2
votes
1answer
271 views

QGIS and Python - create line with multiple points in postgis [closed]

How can I create a line, with Python functions, with many points that are records in Postgis? Thank you
0
votes
1answer
155 views

How can i select many rows from a table?

I want to create an action that select many rows from PostGIS table to show many lines in QGIS. How can i select many rows from table with python to add these rows in a layer? Thank you
3
votes
0answers
300 views

Extracting x,y,z values from a postgis linestring to python using ogr

I am trying to load a postgis linestring into python (using ST_DumpPoints) and extracting x,y,z coordinates, which is working but extremely slow..and if i mean slow, i really mean it (yes, it takes ...
3
votes
2answers
230 views

Need help assigning values to field using OGR in python

I've got a similar question to this one How to programatically populate a shapefile field with polygon areas in OGR?, but the solution doesn't seem to be working for me. I am trying to import a ...
3
votes
2answers
953 views

Automating batch load of multiple GPX files into PostGIS

I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
3
votes
3answers
1k views

How do I apply Dijkstra's algorithm in Python with PostGIS data?

I have currently parsed OSM data, from a PBF file, into a pgRouting database with the use of osm2po, an excellent parsing tool. I don't however want to use the algorithms provided by pgRouting and ...
1
vote
0answers
154 views

Why is not ST_GeomFromEWKB() working?

The following SQL is working fine from the terminal: SELECT MIN(ST_Distance( ST_Transform(ST_GeomFromText('POINT(-3.163916 55.926528)',4326),32630), ...
5
votes
1answer
357 views

How to interpolate polyline or line from points?

We have a lot of points, but with no timestamps to create ways. For now, I've created a sample of the way the points traverse. It's in here, this way can be compared with a Google one. I haven't ...
0
votes
0answers
136 views

Can I do full SQL expressions through the “WHERE” clause in UpdateCursor?

Run as a standalone python script for a shapefile in a toolbox on ArcMap. For example: psql_url_pop = '''SELECT shapefile.NAME_# + shapefile.WIKI_URL FROM public.shapefile''' rows = ...
2
votes
1answer
494 views

How to debug 'Layer is not valid error' from Python plugin?

I'm trying to understand what goes wrong with a QGIS python plugin. Basically I'm trying to render a series of POINT. The query works fine, at least giving it by hand from inside PostGIS DB: "SELECT ...
4
votes
2answers
517 views

How to programmatically create exports from PostGIS database into different file formats (e.g. shapefile, dxf, dgn,…)?

Is there a kind of wrapper/library written in python which would enable me to programatically create exports from postgis database into different file formats (most common being, shapefile, dxf, ...
5
votes
1answer
291 views

Can you synchronize tables between ArcSDE(MSSQL) and PostgreSQL(PostGIS) regularly?

I have spatial tables in ArcSDE 10.1 (MSSQL 2008 R2) geodatabases and need to update the same spatial tables in PostgreSQL 9.1(PostGIS 2.0.1) geodatabases. Basically I use my ArcSDE environment for ...
3
votes
3answers
199 views

Setup a map server that runs from USB to whatever computer it is connected?

I would like to have a USB that I can bring with me to any computer. That USB should hold a map server, so that the client computer wont need internet and avoid using OSM or Google maps or any other ...
1
vote
1answer
282 views

Edit Shapefiles Attribute data in GeoServer Programatically

I'm rendering a shapefile using GeoServer and using OpenLayers library to render it in the web browser. Now I have created the option of editing the attribute data in web browser. I want the edited ...
8
votes
2answers
412 views

Best design for Open Source Python / PostGIS prototype

I am writing a data intensive web application that is delivered through apache. My question is about how to best arrange processing given that there are multiple options. I have at my disposal ...
2
votes
1answer
224 views

How to get all attributes from a non geometry PostGIS layer with Python in QGIS?

I want to extract all attributes from a non geomety layer in QGIS with Python, but there is only the function uniqueValues(fieldIndex) More specific: I have a postgresql table which is loaded into ...
1
vote
0answers
297 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
1answer
183 views

Qgis mapserver - Can it use plugins you use in qgis desktop?

Im thinking about developing a small python plugin for qgis which would access postgis raster database and return data via ST_AsPNG() for example. But since i need this in my wms, would it be possible ...
2
votes
2answers
1k views

Is there a way to automatically populate attribute values in Qgis?

We are using a Qgis/PostGis combo, where Qgis is used for adding features with attributes into a PostGis database. Is there a way to automatically fill the attribute data values with some ...
4
votes
1answer
154 views

Using “Time” in PostgreSQL/PostGIS

I'm loading gtfs into a PostGIS database but I have a problem when loading my stop times. The data is in time format "00:00:00" and for 1:30 AM, my data is "25:30:00". I'd like to keep it that way ...