Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [geoalchemy-2]

GeoAlchemy 2 provides extensions to SQLAlchemy to work with spatial databases. GeoAlchemy 2 focuses on PostGIS. PostGIS 1.5 and PostGIS 2 are supported. Dialects other than PostgreSQL/PostGIS are not supported, and if GeoAlchemy is referenced in a question, the [tag:geoalchemy] tag should be used in preference.

2
votes
1answer
62 views

Create table in one schema, update geometry_columns View in Public schema using GeoAlchemy2

Using the SQLAlchemy ORM with GeoAlchemy2, I can create the table in the public schema and the geometry_columns view gets updated as expected and the created table also includes a gist index on the ...
0
votes
0answers
38 views

Perform Multiple Point in Polygon Queries PostGIS

I was wondering if there was a way to send one request to a PostgreSQL server with the PostGIS extension that contained multiple points, and then find the polygons that they are located in. For ...
0
votes
0answers
84 views

GeoAlchemy2: Cannot insert row because Function st_geomfromewkt(unknown) “does not exist”

i've been stuck on this problem for quite a while now and I can't figure out what could be the issue here. I have a Postgres DB with postgis extension installed CREATE EXTENSION IF NOT EXISTS ...
1
vote
1answer
165 views

st_asMVT in geoalchemy2

I am new to geoalchemy/gis domain. I am looking to establish a local map server using postgis, flask and geoalchemy2. I have imported osm data into postgis and able to see it using qgis software. How ...
2
votes
1answer
158 views

Incorrect distances/area using Python and Shapely

I have a PostGIS table holding cadastral (property) data stored in SRID 3857 (Web Mercator). In Python I want to calculate the length of polygon lines and the area in metres and sq metres respectively....
0
votes
1answer
228 views

Geoalchemy2 && support for ST_MakeEnvelope

I have this working query: SELECT * FROM my_table WHERE my_table.the_geom && ST_MakeEnvelope(-75.97464419082118,39.523869271308314,-72.18532985820512,41.552541030492364); and this is my (...
5
votes
1answer
317 views

Geoalchemy: insert 3D elements in PostGIS database

I have shp files that I would like to insert into a PostGIS database. I'm planning to use Geoalchemy2 and geopandas to do so. However, my data have the geometry types LINESTRING Z and POINT Z. As I ...
1
vote
0answers
354 views

create dynamic geometry point from WKTElement geoalchemy2

I have a function def get_centres(origin_lat, origin_long): pt = WKTElement('POINT({0} {1})'.format(origin_long, origin_lat), srid=4326) centres = Centres.query.with_entities(Centres,...
4
votes
1answer
2k views

Converting geoalchemy2.elements.WKBElement to WKT

I have a geoalchemy2.elements.WKBElement that comes from a query on a Postgres/PostGIS view. I want to convert this to WKT, or otherwise encode it so that it is (Geo)JSON serialisable. How can I ...