GEO ALCHEMY
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.
Elena Miles
Latest Posts
- Leading the Fight Against Cancer: Exploring Bangkok’s World-Class Cancer HospitalsWhen one thinks of Thailand, images of stunning beaches, vibrant street markets, and rich cultural heritage often come to mind. However, Thailand has also earned a remarkable reputation for offering cutting-edge medical services, particularly in the field of cancer treatment. In this blog post, we will delve into the world of cancer hospital Bangkok, a … Read more
- Thai Tranquility: Discover Condos for Sale in ThailandThailand has long been renowned as a paradise of tranquility, offering breathtaking natural beauty, a rich cultural heritage, and a peaceful way of life. For those seeking a serene and tranquil lifestyle, Thailand provides an enticing destination. In this blog, we will explore the concept of finding tranquility through the lens of discovering Thailand condos … Read more
- Streamlining Your Shipping Process with the Power of an APIIn the fast-paced world of e-commerce, efficient shipping processes are crucial for staying competitive. The globalisation of businesses and the rise in online customer demand have made it imperative for companies to deliver their products efficiently and cost-effectively. Streamlining your shipping process is no longer an option but a necessity. One solution that has emerged … Read more
- Seaside Indulgence: Unforgettable Experiences at The Surin in Surin BeachNestled on the pristine coastline of Surin Beach, The Surin Phuket Hotel offers a sanctuary of seaside indulgence. From relaxation and pampering to culinary delights, adventure and exploration, and luxurious accommodations, this hotel has something for everyone. In this post, we’ll explore the unforgettable experiences that await you at The Surin. Relaxation and Pampering The … Read more
- Live Like Royalty: Luxury Pool Villas in Phuket You Need to SeePhuket, an island province in southern Thailand, is one of the most popular tourist destinations in the world. Known for its stunning beaches, crystal-clear waters, and lush greenery, Phuket attracts millions of visitors every year. For those seeking the ultimate luxury pool villa experience, Phuket offers an abundance of options, but Trisara stands out as … Read more

FEATURED COURSE
What’s New in GeoAlchemy
- GeoAlchemy 2 supports PostGIS’
geometry
type, as well as thegeography
andraster
types. - 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
to_shape
,from_shape
functions 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.


FRONT END
Requirements
GeoAlchemy 2 requires SQLAlchemy 0.8. GeoAlchemy 2 does not work with SQLAlchemy 0.7 and lower.

FRONT END
Installation
GeoAlchemy 2 is available on the Python Package Index. So it can be installed with the standard pip or easy_install tools.
TESTIMONIAL
Trusted by Thousands of Students and Tutors

EMMA HART

EDDIE JOHNSON

JONATHAN DOE
