Questions tagged [sqlalchemy]
The sqlalchemy tag has no usage guidance.
12
questions
3
votes
1
answer
102
views
From Geodataframe to PostGIS
I have a geodataframe which I am trying to save to a postgis database.
I have already created a connection to postgis in pgAdmin (username, password, localhost and table)
from geoalchemy2 import ...
0
votes
0
answers
189
views
Handling SQLAlchemy/Geoalchemy relations with Flask in a proper way
I'm facing some difficulties structuring proper models to my database
Situation: Let's say I have a polygon table with many geometries (FARM_AREAS).
All geometries are uploaded via Geopandas. User-...
1
vote
1
answer
310
views
Geodataframe.to_postgis() with Flask and tracking SQLAlchemy Models
I have the following situation:
My application front end will receive a shapefile input and have to save it to a PostGIS database.
After that, the application backend will start a series of tasks that ...
3
votes
1
answer
40
views
How to map a single PostGIS function to multiple Spatialite functions with GeoAlchemy2
In PostGIS we have ST_Affine(geom, a, b, d, e, xoff, yoff) but in Spatialite this functionality is split across 2 functions: ATM_Transform( geom , affine_matrix ), and ATM_Create(a, b, d, e, xoff, ...
1
vote
1
answer
386
views
Calculating the distance For each Row with respect to a Common Point
I have two models with no relation Port and a WareHouse each with a lat and long fields. I want to be able to get the distance for each warehouse from the Port and maybe get the closest e.t.c.
This is ...
4
votes
3
answers
130
views
Points which are beyond certain distance from multiple points
I have two tables - first is a list of positions (points) and second is a list of cities (cities). I am using PostGIS and can find all points outside 10nm of New York by using the SQL statement -
...
0
votes
1
answer
119
views
Inserting GeoDataFrame into existing schema
Is there a straightforward way to insert a GeoDataFrame into an existing schema? I love the geopandas.GeoDataFrame.to_postgis but this creates a new schema. I only need to insert a table into an ...
1
vote
2
answers
2k
views
Setting CRS/SRID using the to_postgis function with GeoPandas?
So, I'm trying to update a PostGIS table after doing some reverse geocoding and other column manipulation I'm running into the find_srid() - could not find the corresponding SRID error.
Based on my ...
6
votes
1
answer
374
views
Uploading a geodataframe with some missing geometries using 'to_postgis'
I have a GeoDataFrame with plenty of info, including a 'geometry' column. Some of the rows have no geometry data... I simply don't have it. I decided to leave those rows as 'None' or 'NoneType' in the ...
1
vote
0
answers
3k
views
Calculating distance between 2 Shapely Points in Meters
I am trying to calculate the distance (in meters) between 2 lon/lng points of type shapely.geometry.point.Point using Python and Shapely. These 2 points are returned from PostGIS by SQLAlchemy/...
2
votes
1
answer
1k
views
Change PostGIS Column from Geometry to Geography
I have a PostGIS table with a column of type Geometry(POINT) and SRID 0 that must be changed to the type Geography(POINT) as it will be used to store lat/lon values.
How can we make this alteration to ...
2
votes
1
answer
426
views
geopandas to_postgis: ValueError: geom (geometry(MULTILINESTRING,4326)) not a string
I have a GeoPandas GeoDataFrame with a column named geom having MultiLineString values as such:
print(gdf.to_markdown()) # using package 'tabulate' to display a markdown table
| | uid | key | ...