Questions tagged [geoalchemy]

GeoAlchemy provides extensions to SQLAlchemy to work with spatial databases.

GeoAlchemy is an extension of SQLAlchemy. It provides support for Geospatial data types at the ORM layer using SQLAlchemy. It aims to support spatial operations and relations specified by the Open Geospatial Consortium (OGC).

Supported Spatial Databases

At present PostGIS, Spatialite, MySQL, Oracle and MS SQL Server 2008 are supported.

Support

GeoAlchemy is at an early stage of development. Its mailing list is available on Google Groups. The source code can be found on GitHub. Also, feel free to email the author directly to send bugreports, feature requests, patches, etc.

Installation

To install type as usual:

$ easy_install GeoAlchemy

Or, download the package, change into geoalchemy dir and type:

$ python setup.py install

References:

http://www.geoalchemy.org/

https://github.com/geoalchemy/geoalchemy

25 questions
0
votes
0 answers

Polygon Contains Point - With GeoAlchemy

I'm trying to query a PostGIS table using GeoAlchemy to return the row where the point lies inside. I've a point and I'm using the timezones shapefile from natural earth. I've tried the below but it just returns the query and not the row item. class…
Tom Shelley
  • 111
  • 2
  • 11
0
votes
3 answers

Geomtery type Multipolygon does not Match Column Type Polygon

Using python, sqlalchemy and the psycopg2 driver, I am trying to go from a shapefile to a geodataframe, to a postgres database with postgis installed foloowing this question I converted the geometry to a WKB hex string, and using df.to_sql()…
Hugh_Kelley
  • 988
  • 1
  • 9
  • 23
0
votes
0 answers

One column for all Shapely types in GeoAlchemy

By now I have this code: value_literal = Column(String()) value_point = Column(Geometry('POINT')) value_multipoint = Column(Geometry('MULTIPOINT')) value_line = Column(Geometry('LINESTRING')) value_multiline =…
lolveley
  • 1,659
  • 2
  • 18
  • 34
0
votes
1 answer

ModuleNotFoundError: No module named 'spatial'

I've been faced to Module Not Found Error in a script which all it's requirements has been installed. I'm trying to import spatial library: import spatial This library is located…
Zar Ashouri
  • 174
  • 3
  • 17
0
votes
1 answer

Find all users x miles away in flask + geoalchemy with ORM

I have created the following SQL query to find all users within a mile and it seems to work fine: SELECT * FROM user WHERE ST_DWithin( user.location, ST_MakePoint(-2.242631, 53.480759)::geography, 1609) ); However I want to convert this…
John Mike
  • 1,895
  • 3
  • 17
  • 26
0
votes
0 answers

Python Insert geojson into mssql

I am attempting to load geojson from a file into mssql express using sqlalchemy for the insert and geopandas to load and read the file. sqlserver examples seems to be hard to find, but below is what i was able to scrape together at this point, which…
Messak
  • 423
  • 1
  • 3
  • 16
0
votes
0 answers

Insertion of POSTGIS datatypes into PostgresDB using Python SQLAlchemy

I am trying to insert POSTGIS values for Linestring, Polygon and other data types into postgres DB using SQLalchemy and came across these errors: This is the Schema of the table created using postgres db commands: Table…
Henin RK
  • 298
  • 1
  • 2
  • 14
0
votes
2 answers

CKAN server down after installing ckanext-plugin extension

I'm trying to install the CKAN ckanext-spatial plugin by following the step-by-step instructions listed below. http://docs.ckan.org/projects/ckanext-spatial/en/latest/install.html#ubuntu-12-04-postgresql-9-1-and-postgis-1-5 After installation and…
AtomEye
  • 81
  • 7
0
votes
1 answer

How to query stored PostGIS Raster data from within the IPython Notebook

Test data 1 TIF file (159KB) Goal threefold: Load raster into PostGIS using raster2pgsql and visualize in QGIS In my IPython Notebook connect to PostGIS and load raster into NumPy array In my IPyhton Notebook use Pandas to load a time-series of…
Mattijn
  • 12,975
  • 15
  • 45
  • 68
0
votes
1 answer

GeoAlchemy pg_function.geojson cannot be decoded with json.loads

Given this function: features being a list of SQLAlchemy objects template just being a dictionary that represents a template for display content to the user def get_feature_dictionary(features, template): feature_list = [] print features …
Joshua Powell
  • 894
  • 1
  • 9
  • 13
1
2