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 choose the best school for your child in ThailandWhen it comes to finding the best school for your child, there are many factors to consider. But with the wealth of excellent schools available in Thailand, it can be tough to decide which one is right for your family. In this article, we explore the different types of schools available in Thailand and offer…
Homeschooling Vs Traditional Schooling: Which Is right for your family?When it comes to deciding on the best education for your children, there are many factors to consider. For some families, homeschooling is the right choice, while others find that traditional schooling is the best option. So what’s the difference? And which is right for your family? Here’s a look at homeschooling vs traditional schooling,…
- The benefits of tourist-friendly English classesAnyone can learn English, regardless of their location or level of expertise. English classes are available for people of all ages and backgrounds, and there are plenty of different ways to learn the language. One great option for learning English is to take classes in a tourist-friendly setting. Here are some of the benefits of…
- How can a marketing agency help push your cannabis products in ThailandA good cannabis marketing agency will be able to help you with all aspects of product promotion, from developing a marketing strategy to executing promotional campaigns that reach your target consumers. They can also help with things like identifying the right media outlets to advertise with and negotiating sponsorships or advertising. In this article we…
- How is cannabis graded in ThailandThis article looks at how cannabis is graded in Thailand. Various strains of cannabis can be found in Thailand, and the quality of the cannabis is often graded according to its potency and rarity. There are three main grades of Thai cannabis – Exotic, top shelf, high grade and mid grade. Exotic strains are the…
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.