Using SQLAlchemy with Spatial Databases
WHAT OUR HAPPY PROGRAMMER SAY
GeoAlchemy 2 provides extensions to SQLAlchemy for working with spatial databases.
GeoAlchemy 2 focuses on PostGIS. PostGIS 1.5 and PostGIS 2 are supported.
SpatiaLite is also supported, but using GeoAlchemy 2 with SpatiaLite requires some specific configuration on the application side. GeoAlchemy 2 works with SpatiaLite 4.3.0 and higher.
GeoAlchemy 2 aims to be simpler than its predecessor, GeoAlchemy. Simpler to use, and simpler to maintain.
- How to Turn Your Ideas into realityWhether they are business ideas, personal ambitions, or a long-held dream, almost everybody has had a brilliant idea at some point in their life. Although the path to success is different for everyone, empowering yourself with the necessary skills, dedication and perseverance can put you on the path to turning your ideas into reality. Whether …
- Car Insurance in Thailand, What You Need to KnowCompulsory Insurance All Thai cars must be insured. The coverage provides for the following Medical Expenses – up to ฿ 80,000 per person Loss of a Vital Organ – Between ฿ 200,000 and ฿ 500,000 Death and Permanent Disability – ฿ 500,000 per person Daily Compensation – ฿ 200 baht per day up to 20 …
- C++ Programing Tutorials.Are you interested in learning how to program in C++? If so, then this article is for you. Here, we have a collection of some of the very best C++ tutorials from across the Internet. We’ve sorted through them and picked out only the best tutorials with tons of ratings and positive feedback from other …
- The Top Ten Best Practices for SQL Database Programming.Programming database is one of the most tasks given to database-oriented programmers. Below are 10 best practices that database programming can utilize: 1. Always use the 3rd normal form (3NF) when developing a database because it makes database management easier and more efficient. 2. Isolate each database table into separate database tables, ensuring that data …
- What Are the Hidden Costs and Benefits of SQL Database Programming?Cost-to-value ratio: Is it viable? The first and probably most important thing to discuss is the cost-to-value ratio associated with getting your application running on a SQL Database. Do you still think it’s a good idea, or do you now think that there are better options out there? Let’s look at some of these factors …
What’s New in GeoAlchemy
- GeoAlchemy 2 supports PostGIS’
geometrytype, as well as the
- The first series had its own namespace for spatial functions. With GeoAlchemy 2, spatial functions are called like any other SQLAlchemy function, using
func, which is SQLAlchemy’s standard way of calling SQL functions.
- GeoAlchemy 2 works with SQLAlchemy’s ORM, as well as with SQLAlchemy’s SQL Expression Language (a.k.a the SQLAlchemy Core). (This is thanks to SQLAlchemy’s new type-level comparator system.)
- GeoAlchemy 2 supports reflection of geometry and geography columns.
- GeoAlchemy 2 adds
from_shapefunctions for a better integration with Shapely.
See the Migrate to GeoAlchemy 2 page for details on how to migrate a GeoAlchemy application to GeoAlchemy 2.
GeoAlchemy 2 requires SQLAlchemy 0.8. GeoAlchemy 2 does not work with SQLAlchemy 0.7 and lower.