Questions tagged [sqlalchemy]
The sqlalchemy tag has no usage guidance.
10
questions
0
votes
0
answers
13
views
Getting an geometry error while creating a table in database from Python using SQLAlchemy
I am trying to create a table in PostgreSQL from Python using SQLAlchemy. The data is an GeoPandas data frame that has the below dtypes, when I am trying to create an table using the below code, it ...
0
votes
1
answer
35
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
97
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
0
answers
13
views
Flask app docker error sqlalchemy query
i have developed a microservice using Flask and SqlAlchemy, and the app was deploiyed into a docker container.
This is my microservice that does a query on PostgreSQL.
@app.route('/position', methods =...
0
votes
1
answer
25
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
315
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 ...
5
votes
1
answer
58
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
803
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
273
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
239
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 | ...