3
votes
Specifying target resolution when resampling with rasterio
You just need to figure out the scale factor from your chosen and current pixel size, e.g. I want to resample this 10m resolution "input.tif" to 12.5m:
import rasterio
from rasterio.enums ...
3
votes
Finding distance between points using Python
As @Vince notes in a comment:
Your query asks for the distance between a point and itself, so zero
is the correct answer. If you want to compare each point with the
other points you need to nest the ...
2
votes
Accepted
Distance between polygons and points in GeoPandas
Attention, you are trying to calculate the Euclidean distance in meters between geometries in degrees (WSG 84, longitude, latitude, EPSG:4326, unit Degree) which is wrong. There are many question/...
2
votes
Retrieve pixel value using SNAP-engine and Python for specific geographic coordinates
I know it has been two years, but there are three things:
You have to load raster data after retrieving a band
p=ProductIO.readProduct('/path/to/file.xml')
iwv=p.getBand('IWV')
iwv.loadRasterData() #...
1
vote
Accepted
Set-Operations with Overlay when columns match
A simple solution is to select the rows of the GeoDataFrames before overlay:
df1 = df1[df1['name'] == 'B']
df2 = df2[df2['name'] == 'B']
result = df1.overlay(df2,how='symmetric_difference')
ax = ...
1
vote
Randomly select points in a feature layer
The below will select a user defined number of level 1 and level 2 records at random from the dataset, just update the num_level1 and num_level2 variables. I have commented the code for ease of use. ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
python × 11006qgis × 2292
gdal × 1680
pyqgis × 1106
arcpy × 1005
geopandas × 884
arcgis-desktop × 801
raster × 737
shapely × 590
shapefile × 568
coordinate-system × 514
rasterio × 475
ogr × 423
postgis × 316
qgis-plugins × 310
geotiff-tiff × 279
polygon × 259
arcgis-10.0 × 257
numpy × 245
arcgis-10.1 × 213
arcmap × 208
fiona × 205
field-calculator × 197
qgis-3 × 191
geojson × 191