5
votes
Accepted
From Geodataframe to PostGIS
You shouldnt need dtype={'geom': Geometry(geometry_type='GEOMETRY', srid= 4326)}.
Try without it and use .to_postgis:
import geopandas as gpd
from sqlalchemy import create_engine
gdf = gpd.read_file(...
2
votes
Accepted
Create multiband raster in Python from X, Y
You're doing a lot of unnecessary looping. You can create your random values in a single array and you don't need a dataframe.
import numpy as np
import rasterio as rio
from rasterio.transform import ...
1
vote
Field Calculator If Statement
Adjust your code with the following code block
def ifBlock(Parcel_Year_Built, Decade_Grouping):
if (Parcel_Year_Built < '1960' and Parcel_Year_Built > '0'):
return "59 and ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 11841qgis × 2341
gdal × 1828
pyqgis × 1107
geopandas × 1094
arcpy × 1027
raster × 813
arcgis-desktop × 792
shapely × 658
shapefile × 609
coordinate-system × 575
rasterio × 565
ogr × 441
postgis × 326
geotiff-tiff × 325
qgis-plugins × 317
polygon × 286
numpy × 264
arcgis-10.0 × 253
geojson × 219
fiona × 215
arcmap × 212
arcgis-10.1 × 209
google-earth-engine × 201
field-calculator × 194